[Rpm-maint] [rpm-software-management/rpm] debugedit: Fix missing relocation of .debug_types section. (#1323)
Jan Kratochvil
jan.kratochvil at redhat.com
Sat Aug 1 09:23:21 UTC 2020
debugedit: Fix missing relocation of .debug_types section.
https://github.com/rpm-software-management/rpm/pull/1323
> 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.
done
> You do include a testcase for the relocatable object case:
done
> I would suggest extending the testcase a little to have multiple larger
> structs, plus some small field names. e.g. add another struct in
> foobar.h:
done
> Maybe we can just remove that warning.
done
> 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).
done
> 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:
done
Thanks,
Jan
More information about the Rpm-maint
mailing list