This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: new warning with 2.19
Tristan Gingold wrote:
On Dec 4, 2008, at 9:32 AM, Alan Modra wrote:
On Thu, Dec 04, 2008 at 08:39:30AM +0100, Ralf Corsepius wrote:
* Is the call to ld triggering the warning correct?
Well it is rather unusual to specify -e with -r. It really only makes
sense if your system runs relocatable executables.
Unless you also want to use --gc-sections. In this case, -e SYM
specifies the root symbol.
We are extending the gcc specs with this rule:
*link:
%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N -e _start}
And apparently gcc has always passed that through for -r as
well but ld did not complain.
It is benign. It is a behaviour that changed. And there is
probably room for everyone involved to fix something:
+ gcc probably shouldn't pass the same *spec for -r
and final links.
+ ld shouldn't complain when the entry argument
doesn't matter.
+ rtems bsp's can fix their specs. (example patch
attached).
I can fix the RTEMS bsp_specs fairly quickly so 1 of the
three can be killed. Ralf.. are you OK with the bsp_specs
change? You shouldn't be specifying the start address unless
you are using the start file.
--joel
Index: bsp_specs
===================================================================
RCS file: /usr1/CVS/rtems/c/src/lib/libbsp/arm/csb336/bsp_specs,v
retrieving revision 1.6
diff -u -r1.6 bsp_specs
--- bsp_specs 12 Apr 2007 03:03:48 -0000 1.6
+++ bsp_specs 4 Dec 2008 14:31:56 -0000
@@ -4,10 +4,10 @@
*startfile:
%{!qrtems: %(old_startfile)} \
-%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s}}
+%{!nostdlib: %{qrtems: start.o%s crti.o%s crtbegin.o%s -e _start}}
*link:
-%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N -e _start}
+%{!qrtems: %(old_link)} %{qrtems: -Qy -dp -Bstatic -N}
*endfile:
%{!qrtems: *(old_endfiles)} %{qrtems: crtend.o%s crtn.o%s }