public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: other/7249: -Wl, and -Xlinker options to arm-aout-gcc
@ 2002-09-30  5:39 rearnsha
  0 siblings, 0 replies; 2+ messages in thread
From: rearnsha @ 2002-09-30  5:39 UTC (permalink / raw)
  To: betoes, gcc-bugs, gcc-prs, nobody, pzn

Synopsis: -Wl, and -Xlinker options to arm-aout-gcc

State-Changed-From-To: open->feedback
State-Changed-By: rearnsha
State-Changed-When: Mon Sep 30 05:39:11 2002
State-Changed-Why:
    I don't think there is anything here that is specific to the ARM, it think it's due to the way the driver programs for gcc have been changed.
    
    Gcc uses a program called collect2 as part of its link process.  Collect2 (to a simple approximation) does the link in three steps: it first links all the objects specified together; then it scans the image for certain symbols, such as C++ constructors, destructors or exception tables, etc; and finally it links in some extra code to ensure that the above information is correctly initialized at the start of execution.  The problem, I think, is that collect2 doesn't understand the -oformat option.
    
    However, even if we taught collect2 about it, I'm not sure it would help much.  collect2 needs to be able to run tools such as nm on the partially linked image, and it can't do that if its been written out in ihex format.
    
    So I really think you need to split your link step into two commands.  In the first produce an executable a.out image using the linker, and in the second use objcopy to translate your final image into ihex format. Ie,
    
    arm-aout-gcc -nostdlib -o foo.aout foo.c
    arm-aout-objcopy -O ihex -o foo foo.aout
    
    This gives you all the flexibility of using gcc to link your image but you still end up with an ihex format file.
    
    Are you happy if I close this PR?

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7249


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: other/7249: -Wl, and -Xlinker options to arm-aout-gcc
@ 2003-01-31 16:20 rearnsha
  0 siblings, 0 replies; 2+ messages in thread
From: rearnsha @ 2003-01-31 16:20 UTC (permalink / raw)
  To: betoes, gcc-bugs, gcc-prs, nobody, pzn

Synopsis: -Wl, and -Xlinker options to arm-aout-gcc

State-Changed-From-To: feedback->closed
State-Changed-By: rearnsha
State-Changed-When: Fri Jan 31 16:20:46 2003
State-Changed-Why:
    No feedback since September

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7249


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-01-31 16:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-30  5:39 other/7249: -Wl, and -Xlinker options to arm-aout-gcc rearnsha
2003-01-31 16:20 rearnsha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).