[PATCH] Create a hook in the TargetHandler to find out which atoms need to have dynamic symbol table entry

Simon Atanasyan simon at atanasyan.com
Tue Jan 21 01:47:04 PST 2014


On Tue, Jan 21, 2014 at 3:06 AM, Shankar Easwaran
<shankare at codeaurora.org> wrote:
> On 1/19/2014 7:39 AM, Simon Atanasyan wrote:
>> Could you please clarify a bit more why this design is a problem in
>> case of -Bsymbolic option? I ask you because the patch in fact does not
>> change the core lld functionality and just:
>>    - Joins and factors out the export condition checking from
>> `DynamicLibraryWriter::buildDynamicSymbolTable` and
>> `OutputELFWriter::buildDynamicSymbolTable` to the
>> `DefaultTargetHandler::needsDynSymEntry`
>
> If there is an entry in the .got that doesnot make it to the .dynsym table
> automatically right ?

All symbols which have entries in the global part of GOT should be
referenced by .dynsym. In case of -Bsymbolic if a symbol has a GOT
entry and it is resolved locally, the GOT entry should be in the local
part of the GOT. So my patch is correct because it writes to the
.dynsym symbols with entries in the global part of GOT only.

Anyway I'm waiting for you patch. After that I will re-implement my fix.

Thanks.

-- 
Simon Atanasyan



More information about the llvm-commits mailing list