[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
Sun May 19 19:54:33 PDT 2019


MaskRay added a comment.

How about

  return std::make_tuple(A.getSymIndex(), A.getOffset()) < std::make_tuple(B.getSymIndex(), B.getOffset());

? i.e. don't check if this is a relative relocation. In the dynamic loader, if `SymIndex` is 0, IMHO the dynamic relocation can only be relative (`R_*_NONE` doesn't make sense).


Repository:
  rLLD LLVM Linker

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D61477/new/

https://reviews.llvm.org/D61477





More information about the llvm-commits mailing list