Go to file
Zbigniew Jędrzejewski-Szmek 2ee6aa07f8 Disable notes with linkers other than bfd
%_package_note_linker != "bfd" disables note insertion, so that it also works
as another opt-out mechanism. Maybe we can improve support in the future.

From https://bugzilla.redhat.com/show_bug.cgi?id=2043178#c26:

  It turns out that gold does something wrong with sections.
  When we add the new section, it shifts existing sections (and even gets one section less than before):
  │ -  Entry point address:               0x500
  │ +  Entry point address:               0x50
  │    Start of program headers:          64 (bytes into file)
  │ -  Start of section headers:          6328 (bytes into file)
  │ +  Start of section headers:          8344 (bytes into file)
  │    Flags:                             0x0
  │    Size of this header:               64 (bytes)
  │    Size of program headers:           56 (bytes)
  │ -  Number of program headers:         9
  │ +  Number of program headers:         8
  │    Size of section headers:           64 (bytes)
  │ -  Number of section headers:         36
  │ -  Section header string table index: 35
  │ +  Number of section headers:         38
  │ +  Section header string table index: 37

  There's a bug open to add INSERT AFTER [https://sourceware.org/bugzilla/show_bug.cgi?id=15373],
  but it's 8 years old.

  Opting out seems to be the best we can do for now.

I also noticed that gold support -dT, only lld doesn't, so the conditional is
adjusted accordingly.
2022-01-24 13:10:04 +01:00
.gitignore Version 0.4 2021-11-16 19:33:12 +01:00
generate-rpm-note.sh Add --insert-after param to the note generation script 2022-01-24 13:09:53 +01:00
macros.package-notes-srpm Disable notes with linkers other than bfd 2022-01-24 13:10:04 +01:00
package-notes.spec Add package-notes-srpm-macros subpackage to configure rpm builds 2022-01-14 18:50:39 +01:00
sources Version 0.4 2021-11-16 19:33:12 +01:00