This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Saturday 07 July 2007, Daniel Jacobowitz wrote: > On Sat, Jul 07, 2007 at 05:35:18AM -0400, Mike Frysinger wrote: > > perhaps objcopy should reject --add-gnu-debuglink requests for ET_REL > > objects ? > > No, I've seen people use this on kernel modules. that makes sense ... then i'd propose having the section discarded by default since any debug file linked to in a relocatable object file will not match the final linked object, and if you link multiple .o's which all contain their own .gnu_debuglink section, the final linked ELF will have those sections merged producing even more useless information in the final ELF. patch attached -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.
2007-07-07 Mike Frysinger <vapier@gentoo.org> * scripttempl/elf.sc: Discard .gnu_debuglink. --- ld/scripttempl/elf.sc +++ ld/scripttempl/elf.sc @@ -125,6 +125,7 @@ RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }" DATARELRO=".data.rel.ro : { *(.data.rel.ro.local* .gnu.linkonce.d.rel.ro.local.*) *(.data.rel.ro* .gnu.linkonce.d.rel.ro.*) }" STACKNOTE="/DISCARD/ : { *(.note.GNU-stack) }" +DEBUGLINK="/DISCARD/ : { *(.gnu_debuglink) }" if test -z "${NO_SMALL_DATA}"; then SBSS=".sbss ${RELOCATING-0} : { @@ -519,5 +520,6 @@ ${OTHER_SECTIONS} ${RELOCATING+${OTHER_SYMBOLS}} ${RELOCATING+${STACKNOTE}} + ${RELOCATING+${DEBUGLINK}} } EOF
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |