public inbox for gas2@sourceware.org
 help / color / mirror / Atom feed
* Does the ELF gas support stabs like a.out does?
@ 1994-11-23 18:41 H.J. Lu
  1994-11-27 16:42 ` Ian Lance Taylor
  0 siblings, 1 reply; 2+ messages in thread
From: H.J. Lu @ 1994-11-23 18:41 UTC (permalink / raw)
  To: gas2; +Cc: Ken Raeburn, Ian Lance Taylor, Eric Youngdale

Hi,

It seems the ELF gas doesn't support stabs like the a.out version
does. That piece code is used to put __init_misc () on the
__libc_subinit list. It doesn't work with the ELF gas.

Is there aother way to create a list using the ELF gas without
create a new subsection?

Thanks.


-- 
H.J. Lu
NYNEX Science and Technology, Inc.			hjl@nynexst.com
----
# gcc-aout -c foo.s
# nm foo.o
00000000 T __init_misc
00000000 - 00 0000   (4) __libc_subinit
# gcc-elf -c foo.s
# nm foo.o
00000000 T __init_misc
-----foo.s----
        .text
        .align 4
        .globl __init_misc
__init_misc:
        ret
        .stabs "__libc_subinit",23,0,0,__init_misc


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

* Does the ELF gas support stabs like a.out does?
  1994-11-23 18:41 Does the ELF gas support stabs like a.out does? H.J. Lu
@ 1994-11-27 16:42 ` Ian Lance Taylor
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Lance Taylor @ 1994-11-27 16:42 UTC (permalink / raw)
  To: hjl; +Cc: gas2, raeburn, eric

   From: hjl@nynexst.com (H.J. Lu)
   Date: Wed, 23 Nov 94 21:40:24 EST

   It seems the ELF gas doesn't support stabs like the a.out version
   does. That piece code is used to put __init_misc () on the
   __libc_subinit list. It doesn't work with the ELF gas.

That is correct.  The symbol set features of a.out are not supported
in ELF.  I don't particularly like symbol sets, and, more importantly,
they can not be efficiently supported in the ELF linker.  All normal
uses of symbol sets can be handled using either weak symbols or
separate sections in ELF.

   Is there aother way to create a list using the ELF gas without
   create a new subsection?

No.  Creating a new section is the way to go.  glibc uses symbol sets
in various ways.  Roland McGrath and I have worked out how they will
be ported to ELF.  You may want to ask exactly what he plans to do in
glibc, and copy it.  Part of it is that the linker will automatically
define special symbols marking the start and end of any sections whose
names can be represented as C identifiers.  The symbols for section
SEC are named __start_SEC and __stop_SEC.

Ian


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

end of thread, other threads:[~1994-11-27 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1994-11-23 18:41 Does the ELF gas support stabs like a.out does? H.J. Lu
1994-11-27 16:42 ` Ian Lance Taylor

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