public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Mapfile
@ 2002-03-26 11:06 Steve Pye
  0 siblings, 0 replies; 7+ messages in thread
From: Steve Pye @ 2002-03-26 11:06 UTC (permalink / raw)
  To: 'gcc-help@gcc.gnu.org'

Hi,

Sorry for bothering you.  I tried the online command-line option pages, but I
couldn't find the option for generating a mapfile for a linked gcc program.
I'm running gcc in a Windows98 Dos Window and generating a Protected
Mode executable.

Can you please let me know what the command line option for generating a
mapfile is?

Thanks kindly,
Steve Pye.

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

* RE: mapfile
       [not found] <2B721C6525F0D411B1E900B0D0226BDD03653227@mohmsg01.ad.infos ys.com>
@ 2003-10-29 12:03 ` Eljay Love-Jensen
  0 siblings, 0 replies; 7+ messages in thread
From: Eljay Love-Jensen @ 2003-10-29 12:03 UTC (permalink / raw)
  To: Ajay Bansal, gcc-help

Hi Ajay,

To generate a map file:
-Wl,-Map,your-map-file.map

To export only specific symbols:
-Wl,--version-script,your-version-file.ver
(You'll have to review the format for the .ver script file.)

HTH,
--Eljay


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

* RE: mapfile
@ 2003-10-29  6:58 Ajay Bansal
  0 siblings, 0 replies; 7+ messages in thread
From: Ajay Bansal @ 2003-10-29  6:58 UTC (permalink / raw)
  To: Tony Wetmore, lrtaylor, abansal, gcc-help

But it does not solve the purpose. So.. That means that gcc (RedHat
Linux) does not have anything like sun compilers/hp/windows compiler
have.. i.e. to have a mapfile/symfile & then export only the required
symbols exported/ 


-----Original Message-----
From: Tony Wetmore [mailto:tony.wetmore@solipsys.com] 
Sent: Tuesday, October 28, 2003 10:45 PM
To: lrtaylor@micron.com; abansal@netegrity.com; gcc-help@gcc.gnu.org


> > Does Linux/gcc support a mapfile syntax, so that we can hide/export 
> > symbols in shared lib on Linux as well?
>
> ...if you declare functions or variables as being static... they will 
> only be visible within that compilation unit...

Of course, code within the compilation unit can always pass (or return)
pointers to static elements to code outside the compilation unit.  I
have never done this across shared library boundaries, but I do not see
why it should fail.

Naturally, this might be a kind of kludgy solution to your problem. :)

---
Tony Wetmore
Raytheon Solipsys
mailto:tony.wetmore@solipsys.com
http://www.solipsys.com


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

* RE: mapfile
  2003-10-28 16:58 mapfile lrtaylor
@ 2003-10-28 17:15 ` Tony Wetmore
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Wetmore @ 2003-10-28 17:15 UTC (permalink / raw)
  To: lrtaylor, abansal, gcc-help


> > Does Linux/gcc support a mapfile syntax, so that we can hide/export
> > symbols in shared lib on Linux as well? 
>
> ...if you declare functions or variables as being static... they 
> will only be visible within that compilation unit...

Of course, code within the compilation unit can always pass (or return)
pointers to static elements to code outside the compilation unit.  I
have never done this across shared library boundaries, but I do not see
why it should fail.

Naturally, this might be a kind of kludgy solution to your problem. :)

---
Tony Wetmore
Raytheon Solipsys
mailto:tony.wetmore@solipsys.com
http://www.solipsys.com

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

* RE: mapfile
@ 2003-10-28 16:58 lrtaylor
  2003-10-28 17:15 ` mapfile Tony Wetmore
  0 siblings, 1 reply; 7+ messages in thread
From: lrtaylor @ 2003-10-28 16:58 UTC (permalink / raw)
  To: abansal, gcc-help


-----Original Message-----
From: Ajay Bansal [mailto:abansal@netegrity.com] 

> Does Linux/gcc support a mapfile syntax, so that we can hide/export 
> symbols in shared lib on Linux as well? 

I believe that the ability to hide/export symbols is a function of the
file format and linker more than of the compiler.  Linux uses the ELF
file format, and the indications I've seen are that it doesn't support
what you are asking.  Then again, I know that if you declare functions
or variables as being static (global functions and variables, not class
member functions and variables), they will only be visible within that
compilation unit.  That at least allows you to define and use functions
that won't be visible outside of the library, but it does not allow you
to define functions that can be used in other compilation units in the
library but that aren't visible outside the library.

Then again, someone probably knows better than me that can give a more
definitive answer than "I don't think so..."

Cheers,
Lyle

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

* mapfile
  2003-09-04 23:03 Same internal function name in libstdc++.so.5 and libjvm.so lrtaylor
@ 2003-10-28  6:12 ` Ajay Bansal
  2003-10-28  6:12 ` mapfile Ajay Bansal
  1 sibling, 0 replies; 7+ messages in thread
From: Ajay Bansal @ 2003-10-28  6:12 UTC (permalink / raw)
  To: gcc-help

 
Does Linux/gcc support a mapfile syntax, so that we can hide/export symbols
in shared lib on Linux as well? 


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

* mapfile
  2003-09-04 23:03 Same internal function name in libstdc++.so.5 and libjvm.so lrtaylor
  2003-10-28  6:12 ` mapfile Ajay Bansal
@ 2003-10-28  6:12 ` Ajay Bansal
  1 sibling, 0 replies; 7+ messages in thread
From: Ajay Bansal @ 2003-10-28  6:12 UTC (permalink / raw)
  To: gcc-help

 
Does Linux/gcc support a mapfile syntax, so that we can hide/export symbols
in shared lib on Linux as well? 


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

end of thread, other threads:[~2003-10-29 12:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-26 11:06 Mapfile Steve Pye
2003-09-04 23:03 Same internal function name in libstdc++.so.5 and libjvm.so lrtaylor
2003-10-28  6:12 ` mapfile Ajay Bansal
2003-10-28  6:12 ` mapfile Ajay Bansal
2003-10-28 16:58 mapfile lrtaylor
2003-10-28 17:15 ` mapfile Tony Wetmore
2003-10-29  6:58 mapfile Ajay Bansal
     [not found] <2B721C6525F0D411B1E900B0D0226BDD03653227@mohmsg01.ad.infos ys.com>
2003-10-29 12:03 ` mapfile Eljay Love-Jensen

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