[PATCH] D57417: [llvm-objcopy] Skip --localize-symbol for undefined symbols

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 08:38:15 PST 2019


rupprecht added a comment.

In D57417#1378516 <https://reviews.llvm.org/D57417#1378516>, @jhenderson wrote:

> To clarify, does objcopy do exactly the same thing (i.e. doesn't localize the undefined global symbol)?


Yep -- that's the difference in the repro from the patch description. I'll add a small comment to the source before committing.

> I was trying to figure out if there was any information on what is supposed to happen with these, but I couldn't find any. I suspect it's simply undefined behaviour (e.g. it could just not patch the reference or it could error out).

In general (i.e. this patch is just one tiny instance), I've found it very difficult to find sources on what "should" happen with things. The ELF spec will satisfy the questions of what fields exist and what values they can have, but don't give much besides a simple example of what the field is, and hardly say anything about combinations of things being set (i.e. in this instance, is SHN_UNDEF + STB_LOCAL even a valid combination).


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57417





More information about the llvm-commits mailing list