public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* mipsel-linux and --export-dynamic
@ 2004-11-04 11:51 Thomas Lopatic
  2004-11-04 15:11 ` Daniel Jacobowitz
  2004-11-04 15:20 ` Ian Lance Taylor
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Lopatic @ 2004-11-04 11:51 UTC (permalink / raw)
  To: binutils

Hi there,

I've compiled binutils 2.15 on an Intel Linux platform with a target of 
mipsel-linux ("./configure --target=mipsel-linux"). I am using this 
build to link objects generated by a cross-plattform GCC. My problem is 
that all external symbols end up in the dynamic symbol table (verified 
with "objdump --dynamic-syms"), although I do not pass 
"--export-dynamic" to the linker.

The problem with this is that I have an executable and shared objects 
loaded by this executable that have conflicting symbols, i.e. some 
symbols appear in the executable as well as in the shared objects. So, 
if an external variable "x" appears in the executable and in a shared 
object, both access the same memory location. I would, however, prefer 
everyone to have his own copy of "x". (Because otherwise the program 
crashes. :-D)

Working around the problem by renaming the symbols in the shared objects 
or the executable to remove the overlaps or making the affected 
variables static would be possible in my case. However, I'd prefer the 
linker to behave as expected. Or is there something that I am missing?

If this is not a known issue, I'll be happy to try to reproduce this 
with the latest binutils CVS version.

Would it also make sense to try to reproduce this with the latest CVS 
version of GCC? I don't know much about ELF, but a symbol is a symbol is 
a symbol, isn't it? So the GCC version shouldn't have any impact on this 
problem, should it?

Thanks for your time
-Thomas


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

end of thread, other threads:[~2004-11-04 16:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04 11:51 mipsel-linux and --export-dynamic Thomas Lopatic
2004-11-04 15:11 ` Daniel Jacobowitz
2004-11-04 15:20 ` Ian Lance Taylor
2004-11-04 16:00   ` Thomas Lopatic
2004-11-04 16:04     ` Daniel Jacobowitz

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).