[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v5 19/28] build_id: Provide ld-embedded build-ids



>>>>> Lastly, we MUST call --binary-id=sha1 on all linker invocation so that
>>>>> symbol offsets don't changes (which means we have multiple binary
>>>>> ids - except that the last one is the final one). Without this change,
>>>>> the symbol table embedded in Xen are incorrect - some of the values it
>>>>> contains are offset by the size of the included build id.
>>>>> This obviously causes problems when resolving symbols.
>>>> Would this also be a problem if you place the notes segment/section
>>>> last in the binary?
>>> I am not sure. Ross, you are the one who observed this?
>> Yes, that would probably solve the problem.
> Sadly no. I stuck the .note right before .bss section and I got:
>
> relink.o: In function `symbols_expand_symbol':
> /home/konrad/xen/xen/common/symbols.c:47: undefined reference to 
> `symbols_names'
> /home/konrad/xen/xen/common/symbols.c:47:(.text+0x30f40): relocation 
> truncated to fit: R_X86_64_PC32 against undefined symbol `symbols_names'
> /home/konrad/xen/xen/common/symbols.c:58: undefined reference to 
> `symbols_token_table'
> /home/konrad/xen/xen/common/symbols.c:58:(.text+0x30f6e): relocation 
> truncated to fit: R_X86_64_PC32 against undefined symbol `symbols_token_table'

Ah yes - our symbol table generation also plays the same trick...

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.