public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug driver/21055] New: Option -Wl,-wrap when no input file
@ 2005-04-16 10:40 bitmap at pan dot homelinux dot com
2005-04-16 13:10 ` [Bug driver/21055] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: bitmap at pan dot homelinux dot com @ 2005-04-16 10:40 UTC (permalink / raw)
To: gcc-bugs
Why there is no 'input file error' when using -Wl,-wrap ?
$ gcc -shared -o champion.so
gcc: no input files
$ gcc -shared -o champion.so -Wl,-wrap -Wl,toto
$ ld -shared -o champion.so -wrap toto
ld: no input files
--
Summary: Option -Wl,-wrap when no input file
Product: gcc
Version: 3.4.4
Status: UNCONFIRMED
Severity: minor
Priority: P2
Component: driver
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bitmap at pan dot homelinux dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: Reading specs from /usr/lib/gcc/i486-linux/3.4.4/specs
Configur
GCC host triplet: Linux
GCC target triplet: gcc (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-12)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21055
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug driver/21055] Option -Wl,-wrap when no input file
2005-04-16 10:40 [Bug driver/21055] New: Option -Wl,-wrap when no input file bitmap at pan dot homelinux dot com
@ 2005-04-16 13:10 ` pinskia at gcc dot gnu dot org
2005-04-19 20:09 ` wilson at gcc dot gnu dot org
2005-07-19 5:16 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-16 13:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-04-16 13:10 -------
$ gcc -shared -o champion.so -Wl,-wrap -Wl,toto
Because we add -lgcc -lc and others, so this is not a bug at all.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
GCC build triplet|Reading specs from |Reading specs from
|/usr/lib/gcc/i486- |/usr/lib/gcc/i486-
|linux/3.4.4/specs |linux/3.4.4/specsConfigur
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21055
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug driver/21055] Option -Wl,-wrap when no input file
2005-04-16 10:40 [Bug driver/21055] New: Option -Wl,-wrap when no input file bitmap at pan dot homelinux dot com
2005-04-16 13:10 ` [Bug driver/21055] " pinskia at gcc dot gnu dot org
@ 2005-04-19 20:09 ` wilson at gcc dot gnu dot org
2005-07-19 5:16 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: wilson at gcc dot gnu dot org @ 2005-04-19 20:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From wilson at gcc dot gnu dot org 2005-04-19 20:09 -------
This is due to an internal implementation detail. The -Wl options are handled
by pretending that the argument to the -Wl option is an object file name. This
works because the only thing we do with object file names on the command line is
to pass them to the linker. Search gcc.c for "-Wl", and note that the code
increments n_infiles. Once n_infiles has been incremented, it is impossible for
the gcc driver to tell whether or not the user has specified any input files.
This is clearer without the other arguments.
aretha$ gcc
gcc: no input files
aretha$ gcc -Wl,-wrap
/usr/lib64/gcc-lib/x86_64-suse-linux/3.3.3/../../../../lib64/crt1.o(.text+0x21):
In function `_start':
../sysdeps/x86_64/elf/start.S:92: undefined reference to `main'
collect2: ld returned 1 exit status
The -Xlinker/-Xassembler/-Xpreprocessor options have the same problem.
Incidentally, -Xassembler/-Xpreprocessor can't possibly work, as they aren't
supposed to be passing options to the linker. It looks like they have never
worked. The original patch from Apple has the same bug. This probably deserves
another bug report.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21055
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug driver/21055] Option -Wl,-wrap when no input file
2005-04-16 10:40 [Bug driver/21055] New: Option -Wl,-wrap when no input file bitmap at pan dot homelinux dot com
2005-04-16 13:10 ` [Bug driver/21055] " pinskia at gcc dot gnu dot org
2005-04-19 20:09 ` wilson at gcc dot gnu dot org
@ 2005-07-19 5:16 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-19 5:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-07-19 05:15 -------
But this problem with -Wl,-wrap is really invalid as we treat all -Wl, as input files and unknown to what
GCC the driver should do.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
GCC build triplet|Reading specs from |
|/usr/lib/gcc/i486- |
|linux/3.4.4/specsConfigur |
GCC host triplet|Linux |
GCC target triplet|gcc (GCC) 3.4.4 20050314 |i486-pc-linux-gnu
|(prerelease) (Debian 3.4.3- |
|12) |
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21055
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2005-07-19 5:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-16 10:40 [Bug driver/21055] New: Option -Wl,-wrap when no input file bitmap at pan dot homelinux dot com
2005-04-16 13:10 ` [Bug driver/21055] " pinskia at gcc dot gnu dot org
2005-04-19 20:09 ` wilson at gcc dot gnu dot org
2005-07-19 5:16 ` pinskia at gcc dot gnu dot org
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).