From: SourceForge.net <no...@so...> - 2003-09-30 10:46:24
|
Bugs item #815021, was opened at 2003-09-30 12:46 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=815021&group_id=2435 Category: gcc Group: None Status: Open Resolution: None Priority: 5 Submitted By: Dimitri Papadopoulos (papadopo) Assigned to: Danny Smith (dannysmith) Summary: -Wl,--allow-shlib-undefined doesn't seem to work Initial Comment: Hi, The --allow-shlib-undefined option doesn't seem to allow undefined symbols in DLLs as advertized. To reproduce this: $ cat foo.c #include "foo.h" void toto() { } $ $ gcc -shared -o foo.dll foo.c $ $ cat bar.c #include "bar.h" #include "foo.h" void bar() { foo(); } $ $ gcc -shared -o bar.dll bar.c C:/DOCUME~1/PAPADO~1.POB/LOCALS~1/Temp/ccspbaaa.o(.text+0x7):bar.c: undefined reference to `foo' $ So far so good. There's indeed an undefined reference. Now try --allow-shlib-undefined to allow for these undefined references: $ gcc -shared -Wl,--allow-shlib-undefined -o bar.dll bar.c C:/DOCUME~1/PAPADO~1.POB/LOCALS~1/Temp/ccspbaaa.o(.text+0x7):bar.c: undefined reference to `foo' $ I'm filing this as a gcc issue because callling ld directly does work: $ ld -r -o bar.dll bar.o $ ld -r --allow-shlib-undefined -o bar.dll bar.o $ ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=815021&group_id=2435 |