[lld] r182076 - [lld][ELF][X86_64] Reorganize X86_64 Target specific code
Shankar Easwaran
shankare at codeaurora.org
Fri May 17 17:06:04 PDT 2013
On 5/17/2013 6:43 PM, Sean Silva wrote:
> On Fri, May 17, 2013 at 3:10 PM, Shankar Easwaran
> <shankare at codeaurora.org>wrote:
>
>> On 5/17/2013 3:42 PM, Sean Silva wrote:
>>
>>> Unrelated to the patch, but can these be `static`?:
>>>
>>> +const uint8_t X86_64PLTAtom::_**defaultContent[16] = {
>>> + 0xff, 0x25, 0x00, 0x00, 0x00, 0x00, // jmpq *gotatom(%rip)
>>> + 0x68, 0x00, 0x00, 0x00, 0x00, // pushq reloc-index
>>> + 0xe9, 0x00, 0x00, 0x00, 0x00 // jmpq plt[-1]
>>> +};
>>>
>>> -- Sean Silva
>>>
>>> Thanks for your reply, Sean.
>> These cannot be static, as these are entries for each PLT entry. Each PLT
>> entry may have a different relocation index, thats pointing to the
>> .rela.dyn entry.
>>
> Sorry, I think I miscommunicated. What I meant is whether these small
> _defaultContent arrays can be put in an anonymous namespace or otherwise
> internalized so that they do not appear as symbols in the final lld binary.
The symbols that get created are all in a read only section. I dont
think they can namespace collide too. You can strip the symbol table off
after the final link too, there are lot of options if you want to just
hide the name.
000000000064d601 R lld::elf::X86_64GOTAtom::_defaultContent
000000000064d610 R lld::elf::X86_64PLTAtom::_defaultContent
000000000063f462 R lld::elf::HexagonGOTAtom::_defaultContent
000000000063f480 R lld::elf::HexagonPLTAtom::_defaultContent
000000000063f466 R lld::elf::HexagonGOTPLTAtom::_defaultContent
000000000063f470 R lld::elf::HexagonGOTPLT0Atom::_defaultContent
Why do you want to do that anyways ?
Thanks
Shankar Easwaran
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation
More information about the llvm-commits
mailing list