In compare with D30458, this makes Bss/BssRelRo to be pure
synthetic sections.
That removes CopyRelSection class completely, making
Bss/BssRelRo to be just regular synthetics.
Paths
| Differential D30541
[ELF] - Make Bss and BssRelRo sections to be synthetic (#2). AbandonedPublic Authored by grimar on Mar 2 2017, 9:38 AM.
Details Summary In compare with D30458, this makes Bss/BssRelRo to be pure That removes CopyRelSection class completely, making
Diff Detail Event TimelineComment Actions LGTM. This is looking pretty good. Converting shared symbols to the regular symbols for copy relocations seems to simplify things. This change makes me think of using the same technique for other symbols. For example, we might want to convert DefinedCommon to DefinedRegular when a common symbol gets an address in .bss. Not sure if that'll work but should be worth trying.
This revision is now accepted and ready to land.Mar 6 2017, 6:26 AM Closed by commit rL297008: [ELF] - Make Bss and BssRelRo sections to be synthetic (#2). (authored by grimar). · Explain WhyMar 6 2017, 6:49 AM This revision was automatically updated to reflect the committed changes. Comment Actions
Previously SharedSymbol had Verdef member, patch changes logic. Currently SharedFile contains mapping from symbol to verdef. This revision is now accepted and ready to land.Mar 10 2017, 6:35 AM
Revision Contents
Diff 91336 ELF/InputFiles.h
ELF/OutputSections.h
ELF/OutputSections.cpp
ELF/Relocations.cpp
ELF/SymbolTable.cpp
ELF/Symbols.h
ELF/Symbols.cpp
ELF/SyntheticSections.h
ELF/SyntheticSections.cpp
ELF/Writer.cpp
test/ELF/version-script-copy-rel.s
|
Here is an idea. Can you overwrite the symbol body using replaceBody<> to change the type from SharedSymbol to DefinedSynthetic?