.note.gnu.build-id section not really used in ARM kernel (and NOTES macro not present in linker cmd file)
frederic.turgis at linaro.org
Fri Feb 25 12:11:18 UTC 2011
thanks for the info.
This addresses all questions that we had with Roland McGrath from
Redhat on systemtap mailing list. Roland is the one who added
--build-id option in Makefile in 2007.
I shared info to mailing list.
On 25 February 2011 00:20, Nicolas Pitre <nicolas.pitre at linaro.org> wrote:
> On Thu, 24 Feb 2011, Frederic Turgis wrote:
>> Hi all,
>> While testing systemtap v1.4, I encountered an issue in the tool that
>> had been fixed in the past (and reintroduced recently). I have
>> investigated with Redhat guys and here is what we have found:
>> - root cause is that .note.gnu.build-id is mapped at address 0 in
>> vmlinux (we did a readelf -S on vmlinux)
>> - (.note.*) sections can be mapped at a specific location through
>> NOTES macro defined in vmlinux.lds.h. vmlinux.lds.h mentions that
>> minimal linker scripts has following content
>> * _edata = .;
>> * EXCEPTION_TABLE(...)
>> * NOTES
>> - .note.gnu.build-id is mapped at address 0 because NOTES is not used
>> in ARM linker cmd file. We are wondering if there is any specific
>> reason with Redhat.
>> Furthermore, .zImage.cmd contains "arm-linux-gnueabi-objcopy ... -R
>> .note -R .note.gnu.build-id", where "-R" removes mentioned sections
>> from the binary. We clearly don't want (.notes.*) sections, which
>> could have appeared as /sys/kernel/notes
>> Would there be an interest in mapping "notes" section in linker cmd file ?
> Already done:
More information about the linaro-kernel