[PATCH] D45325: [ELF] - Reorder local symbols.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 5 08:11:49 PDT 2018


grimar created this revision.
grimar added reviewers: ruiu, espindola.
Herald added subscribers: arichardson, emaste.

This fixes PR36716 (https://bugs.llvm.org/show_bug.cgi?id=36716),

Patch do next things:

1. Enables producing the file symbols (the same what https://reviews.llvm.org/D45261 do, so I think we can land it first).
2. Sorts local symbols to match the following order: `file1, local1, hidden1, file2, local2, hidden2 ...`

One of the problems I had to solve was SHT_GROUP sections finalization. It happens in `finalizeShtGroup`
and relies on the local symbols order which is now changes during the finalization of .symtab.
I had to split the output sections finalization into 2 loops to resolve this.


https://reviews.llvm.org/D45325

Files:
  ELF/SyntheticSections.cpp
  ELF/Writer.cpp
  test/ELF/file-sym.s
  test/ELF/local-symbol-order.s
  test/ELF/lto/data-ordering-lto.s
  test/ELF/lto/parallel-internalize.ll
  test/ELF/lto/relocatable.ll
  test/ELF/lto/symbol-ordering-lto.s
  test/ELF/relocatable-comdat-multiple.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45325.141156.patch
Type: text/x-patch
Size: 9136 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180405/dd8c9d48/attachment.bin>


More information about the llvm-commits mailing list