[PATCH] D63540: Fix lookup of symbols with the same address range but different binding

Muhammad Omair Javaid via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 23 13:22:24 PST 2019


omjavaid added a comment.

Some new observations:

With this approach of not setting size of a non-last zero-sized symbol we somehow mange to zero out size of init (_init symbol) and .text (_start symbol).

To build and evaluate a.out   echo -e '#include <unistd.h>\nint main(void){\nsync();return 0;}'|./bin/clang -g -x c -;./bin/lldb -o 'file ./a.out' -o 'b main' -o r -o 'p (void)sync()'

Please see objdump of a.out here https://pastebin.ubuntu.com/p/N5krm5TWFV/

Please see diff of symtab dump here: https://pastebin.ubuntu.com/p/zwmC9cVTGc/

symtab dump of a.out here with above patch applied: https://pastebin.ubuntu.com/p/Fs4yyG82s5/
symtab dump of a.out here without above patch applied: https://pastebin.ubuntu.com/p/TCKXVjnGsH/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D63540





More information about the llvm-commits mailing list