This is the mail archive of the
mailing list for the binutils project.
linking elf notes together on elf32-arm
- From: Mark Wielaard <mjw at redhat dot com>
- To: binutils at sourceware dot org
- Cc: Stan Cox <scox at redhat dot com>, Nick Clifton <nickc at redhat dot com>
- Date: Wed, 06 Jul 2011 22:57:39 +0200
- Subject: linking elf notes together on elf32-arm
While trying to build a program that uses sdt elf notes on an elf32-arm
architecture I get the following error on the final link:
/usr/bin/ld: staprun-util.o: duplicate section `.note.stapsdt' has
The different object files do have different sized note sections,
because they contain different things and so shouldn't be merged
together as duplicates.
This is because all elf notes are marked as link once in
/* Set the right machine number for an Arm ELF file. */
elf32_arm_section_flags (flags, hdr)
if (hdr->sh_type == SHT_NOTE)
*flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS;
That seems wrong to me. Why are all SHT_NOTE sections treated that way?
Should it be just some specific arm named ones?
It seems to have been introduced a long time ago:
2003-03-25 Stan Cox <firstname.lastname@example.org>
Nick Clifton <email@example.com>
Contribute support for Intel's iWMMXt chip - an ARM variant:
(elf32_arm_section_flags): New function: Set flags on note section.
Can anybody remember why that was, and how to make it so that "normal"
elf notes don't get merged?