Hi Florian, >> * Weak symbols are not generated by the annobin plugin >> when compiling with -ffunction-sections. >> >> There was no point really. Linker garbage collection will not >> discard sections if they have annobin notes against them, since >> the code section and the note section are not in a section group. >> Really this is a gcc problem. If it created a section group for >> sections created by the -ffunction-sections option, then annobin >> could add the notes into this group and linker garbage collection >> would discard the lot. >> >> Note - annobin does still generate weak symbols for linkonce >> sections, since these can and will be discarded by the linker. >> The symbols still get into the dynamic symbol table, but they >> are hidden. Not sure if this makes much difference however. > > Doesn't this keep all function sections in the final executable because they are now permanently referenced? Yes. :-( Well yes, but only if they have different optimization attributes from the rest of the compilation unit that they are in. IE, only if annobin notes are generated for them. I have tried to find a away around this, but the only solution that I can come up with is to properly use section groups to contain the function section, any debug sections and the annobin note section. To do this we first have to start with gcc, and persuade it to emit the necessary assembler to define a section group. As soon as I have a free moment I plan to create a patch to do this. > >> * The annobin plugin will now only reference symbols that it >> creates, and all of these symbols now have a ".annobin_" prefix >> in order to avoid potential collisions with symbols defined >> elsewhere in the executable. > > Can this still cause symbol clashes if two linkonce sections (of different names) contain functions which receive annobin annotations? It shouldn't. The annobin symbol is basically the section name with ".annobin_" as a prefix. So two difference linkonce sections should also have two different annobin symbols. > Anyway, looks like these annobin changes exposed a binutils bug: > > <https://bugzilla.redhat.com/show_bug.cgi?id=1596823> Yes. I forgot to check ifunc functions. Doh. This should now be fixed though... Cheers Nick _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx/message/42G3TFEGT7ZTBKHLEZ4ZL6H563B5IHUU/