[Rpm-maint] [rpm-software-management/rpm] debugedit: Fix missing relocation of .debug_types section. (#1323)
jan.kratochvil at redhat.com
Sat Aug 1 09:23:21 UTC 2020
debugedit: Fix missing relocation of .debug_types section.
> But here is a review inline:
> If it is for the same lines that are moved from edit_dwarf2 () to
> edit_info () below then it is fine, but if you do it in a separate
> commit maybe also factor out edit_info () already? To make the next
> commit easier to read.
Yes, that was my original intention but I made a mistake, fixed now.
> This will only work for executables or shared librareis, not for
> (ET_REL) object files (or kernel modules) because those come with more
> than 1 (comdat) .debug_types section. This is probably fine. But if you
> expect that .debug_types will also appear in relocatable files, then
> you might want to look at what edit_dwarf2() does for .debug_macro,
> which might also appear multiple times.
> You do include a testcase for the relocatable object case:
> I would suggest extending the testcase a little to have multiple larger
> structs, plus some small field names. e.g. add another struct in
> Maybe we can just remove that warning.
> This looks OK. But just before this the sections that have been changed
> are marked "dirty", you probably want to mark DEBUG_TYPES also dirty if
> it has been updated in any way (otherwise it isn't guaranteed the data
> is written to disk, although it often will be).
> To make sure you test the case where there are multiple debug line
> table offsets in your .debug_type sections, you might want to add
> something like the following to bar.c:
More information about the Rpm-maint