* gcc doesn't pass stdout to ld?
@ 1997-12-05 8:05 Neal Becker
1997-12-05 8:36 ` Richard Henderson
1997-12-05 9:20 ` Ian Lance Taylor
0 siblings, 2 replies; 3+ messages in thread
From: Neal Becker @ 1997-12-05 8:05 UTC (permalink / raw)
To: egcs
With gcc-2.7.2, I used to do:
/usr/local/m68k/m68k-unknown-coff/bin/gcc -m68000 -msoft-float -T
flash.ld -o rcv -v apps/crt0.o apps/main.o apps/init.o apps/jumptbl.o
version.o -Lapps -lapps -Lapi -lapi -Lscc -lscc -Lccube -lccube
-Ldemod -ldemod -Lperipher -lperipher -Lrf -lrf -Llibgloss -lgloss -u
main -lm -lc -lgloss -nostartfiles -Wl,-M > map
To get a map file. It appears that egcs-1.0 doesn't pass the stdout
to ld, because now the map is written not to the redirected "map", but
to my terminal. Any reason for the change? A workaround?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gcc doesn't pass stdout to ld?
1997-12-05 8:05 gcc doesn't pass stdout to ld? Neal Becker
@ 1997-12-05 8:36 ` Richard Henderson
1997-12-05 9:20 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 1997-12-05 8:36 UTC (permalink / raw)
To: Neal Becker; +Cc: egcs
On Fri, Dec 05, 1997 at 10:53:37AM -0500, Neal Becker wrote:
> To get a map file. It appears that egcs-1.0 doesn't pass the stdout
> to ld, because now the map is written not to the redirected "map", but
> to my terminal. Any reason for the change? A workaround?
Strange.. Anyway, a workaround would be -Wl,-Map,file.
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gcc doesn't pass stdout to ld?
1997-12-05 8:05 gcc doesn't pass stdout to ld? Neal Becker
1997-12-05 8:36 ` Richard Henderson
@ 1997-12-05 9:20 ` Ian Lance Taylor
1 sibling, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 1997-12-05 9:20 UTC (permalink / raw)
To: neal; +Cc: egcs
From: Neal Becker <neal@ctd.comsat.com>
Date: Fri, 5 Dec 1997 10:53:37 -0500
With gcc-2.7.2, I used to do:
/usr/local/m68k/m68k-unknown-coff/bin/gcc -m68000 -msoft-float -T
flash.ld -o rcv -v apps/crt0.o apps/main.o apps/init.o apps/jumptbl.o
version.o -Lapps -lapps -Lapi -lapi -Lscc -lscc -Lccube -lccube
-Ldemod -ldemod -Lperipher -lperipher -Lrf -lrf -Llibgloss -lgloss -u
main -lm -lc -lgloss -nostartfiles -Wl,-M > map
To get a map file. It appears that egcs-1.0 doesn't pass the stdout
to ld, because now the map is written not to the redirected "map", but
to my terminal. Any reason for the change? A workaround?
This is due to a change in collect2. I consider it to be a bug; it
causes problems other than the one you mention.
The bug is that tlink_execute redirects all linker output to both
stdout and stderr into a file. It then examines the file, and writes
it to stderr. The effect is that all output the linker sends to
stdout gets redirected to stderr.
The fix is presumably to redirect and examine stdout and stderr
separately.
One work around you can use is -Wl,-Map,map.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1997-12-05 9:20 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-05 8:05 gcc doesn't pass stdout to ld? Neal Becker
1997-12-05 8:36 ` Richard Henderson
1997-12-05 9:20 ` Ian Lance Taylor
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).