[PATCH] D30892: [ELF] - Make Bss and BssRelRo sections to be synthetic (#3).

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 09:11:59 PDT 2017


grimar updated this revision to Diff 92006.
grimar added a comment.

- Fixed one more issue that hopefully should be enough now for aarch64 bot.

Issue was relative to symbol alignment. If we had common symbol and ".bss" section for it with alignment 4
and then created copy relocation for symbol with alignment == 8 then final layout was wrong.

It was AAAABBBBBBBB when should be AAAA0000BBBBBBBB, where A - space for common symbol and
B - space for copy relocated.

That happened because previously we would create 2 .bss sections (one for commons, one for relocations),
but now create single.

Testcase is provided.


https://reviews.llvm.org/D30892

Files:
  ELF/OutputSections.cpp
  ELF/OutputSections.h
  ELF/Relocations.cpp
  ELF/Symbols.cpp
  ELF/Symbols.h
  ELF/SyntheticSections.cpp
  ELF/SyntheticSections.h
  ELF/Writer.cpp
  test/ELF/Inputs/relocation-copy-align-common.s
  test/ELF/relocation-copy-align-common.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30892.92006.patch
Type: text/x-patch
Size: 11809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/86270290/attachment.bin>


More information about the llvm-commits mailing list