[PATCH] D28612: [ELF] - Added support for --emit-relocs.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 09:10:07 PST 2017


grimar created this revision.
grimar added reviewers: ruiu, rafael.
grimar added subscribers: llvm-commits, grimar, evgeny777.

This is PR31579.

-q, --emit-relocs - Generate relocations in output

We used DynsymIndex for storing symtab index of symbol for -r
and I reused it in this patch for the same for --emit-relocs.
Had to add restriction that --emit-reloc and -pie/-shared/.so inputs 
are not compatible together (so .dynsym is never created with --emit-reloc).
That seems fine as looks enough to fix PR31579.

Alternative probably can be another variable in SymbolBody for that,
but I am not sure we want it.


https://reviews.llvm.org/D28612

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/InputFiles.cpp
  ELF/InputSection.cpp
  ELF/Options.td
  ELF/OutputSections.cpp
  ELF/SyntheticSections.cpp
  ELF/Writer.cpp
  test/ELF/Inputs/emit-relocs.s
  test/ELF/emit-relocs.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28612.84133.patch
Type: text/x-patch
Size: 9064 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170112/0fc0d727/attachment.bin>


More information about the llvm-commits mailing list