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 ?
Regards Fred
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:
http://ftp.arm.linux.org.uk/git/gitweb.cgi?p=linux-2.6-arm.git%3Ba=commitdif...
Nicolas
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.
Regards Fred
On 25 February 2011 00:20, Nicolas Pitre nicolas.pitre@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:
http://ftp.arm.linux.org.uk/git/gitweb.cgi?p=linux-2.6-arm.git%3Ba=commitdif...
Nicolas
linaro-kernel@lists.linaro.org