one more h8300 ld -r problem left
Ian Lance Taylor
ian@zembu.com
Thu Nov 2 16:45:00 GMT 2000
Date: Thu, 2 Nov 2000 11:49:00 -0800
From: Nick Clifton <nickc@redhat.com>
: It appears the ld -r adds ctor/dtor symbols to files.
:
: Any ideas?
This is the fault of the linker script(s). They unconditionally
create symbols in the .tors section whenever a link happens, so the
linker is forced to create .tors section each time. The following
patch should fix this.
! ${RELOCATING+ __ctors = . ; }
You should build constructors based on CONSTRUCTING, not on
RELOCATING. That is what permits the -Ur option to work.
*(.ctors)
You should only put the .ctors section into the .text section when
CONSTRUCTING. Otherwise, -r will break because the .ctors will be
lost in the .text section after the relocateable link, so they will
not be used in the final link. I think m68kcoff.sc gets it right.
Ian
More information about the Binutils
mailing list