Commit Graph

4 Commits

Author SHA1 Message Date
George Rimar 80355234f7 [ELF] - Allow applying SHF_MERGE optimization for relocatable output.
This fixes PR35223.

Here I enabled SHF_MERGE section content merging for -r like
we do for regular linking.

Differential revision: https://reviews.llvm.org/D40026

llvm-svn: 318516
2017-11-17 11:27:57 +00:00
Rafael Espindola 28742faf49 Make the test more strict. NFC.
llvm-svn: 318263
2017-11-15 04:00:54 +00:00
Petr Hosek 3b4e29ba68 [ELF] Update tests to work even with modified defaults
D30229 changes the defaults based on section names to match the
GAS behavior, which breaks some of the tests that rely on the old
defaults.

Differential Revision: https://reviews.llvm.org/D30967

llvm-svn: 297803
2017-03-15 03:38:48 +00:00
Simon Atanasyan 02b9c3f8c3 [ELF] Do not merge sections in case of relocatable object generation
Do not merge sections if generating a relocatable object. It makes
the code simpler because we do not need to update relocations addends
to reflect changes introduced by merging. Instead of that we write
such "merge" sections into separate OutputSections and keep SHF_MERGE
/ SHF_STRINGS flags and sh_entsize value to be able to perform merging
later during a final linking.

Differential Revision: http://reviews.llvm.org/D25066

llvm-svn: 283300
2016-10-05 07:49:18 +00:00