[PATCH] D24837: [ELF] Emit a diagnostic if there's reference to a local symbol in a discarded COMDAT section
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 22 13:52:27 PDT 2016
davide added a comment.
I'm not sure it did. This is the disassembly of the generated lld output (in particular the second `callq`).
Disassembly of section .text2:
foo:
1000: 90 nop
Disassembly of section bar:
bar:
1001: e8 fa ff ff ff callq -6 <foo>
1006: e8 f5 ef ff ff callq -4107
This is, instead, what gold generates:
./patatino: file format elf64-x86-64
Disassembly of section .text2:
00000000000001c4 <foo>:
1c4: 90 nop
Disassembly of section bar:
00000000000001c5 <bar>:
1c5: e8 fa ff ff ff callq 1c4 <foo>
1ca: e8 31 fe ff ff callq 0 <foo-0x1c4>
I'm not quite sure we ought to produce a valid output, given that the input is not a valid ELF.
https://reviews.llvm.org/D24837
More information about the llvm-commits
mailing list