[PATCH] D61477: [ELF] -z combreloc: sort dynamic relocations by (!is_relative,symbol_index,r_offset)

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 2 22:23:20 PDT 2019


MaskRay created this revision.
MaskRay added reviewers: ruiu, grimar, mcgrathr.
Herald added subscribers: llvm-commits, arphaman, arichardson, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

Fixes PR41692.

We currently sort dynamic relocations by (!is_relative,symbol_index).
Add r_offset as the third key. This looks slightly better and is
consistent with ld.bfd and gold.

Refactor the test combreloc.s (renamed from combrelocs.s) to check
R_X86_64_RELATIVE, and delete --expand-relocs.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D61477

Files:
  ELF/SyntheticSections.cpp
  test/ELF/combreloc.s
  test/ELF/combrelocs.s
  test/ELF/i386-got-and-copy.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61477.197917.patch
Type: text/x-patch
Size: 6186 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190503/9977347a/attachment.bin>


More information about the llvm-commits mailing list