RE: Building with AIX gcc 3.3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David wrote:
> >> nm -BCpg *.o | awk '{ if ((($2 == "T") || ($2 == "D") || ($2 
> >> == "B")) && (substr($3,1,1) != ".")) { print $3 } }' | sort 
> >> -u > icu.exp
> >> 
> >> Also, you need to use -Wl,-G when creating the shared object and
> >> -Wl,-brtl when linking the final application.
> 
> Frank> Doesn't the GCC frontend do all this automatically? 
> collect2 generates
> Frank> an export file and adds it to the linker command, and 
> -brtl is added
> Frank> automatically, when -shared is used. The frontend does 
> not add -G
> Frank> automatically when linking shared libraries, however. 
> On the other hand
> Frank> this doesn't seem to make a difference.
> 
> 	collect2 creates an export file for symbols that collect2
> generates -- static constructors and destructors, and frames. 
>  collect2
> cannot make assumptions about how user symbols will be used and cannot
> generate an export file for those.

You're right, David. How could I doubt that. I was just to lazy to
look at the .x-file contents.

> 	Also, GCC does not invoke the linker with "-brtl" under any
> circumstances.  GCC "-shared" invokes the linker with "-bM:SRE", which
> creates a shared object.  GCC does not make any assumptions 
> about the user expecting System-V semantics. 

Your point also: someone modified the specs file at our site. Don't
know why ... 

Sorry,
	- frank


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux