This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: .gnu.linkonce.? and .gcc_except_table


John Farmer <news02@lavabit.com> writes:

> What pray tell may does .gnu.linkonce.r, .gnu.linkonce.b etc and
> gcc_except_table all mean when applied to input sections? Are any of these
> actually documented, presumably there are other such options too?

Those are the names of input section names.  The names beginning with
.gnu.linkonce are used by gcc for vague linking.  See the docs in the
gcc manual for why vague linking exists.  When the GNU linker sees two
input sections with the same name, and the name starts with
".gnu.linkonce.", the linker will only keep one copy and discard the
other.  .gcc_except_table is also an input section name, which gcc uses
for information used to unwind the stack when an exception occurs.


> Perhaps there is a good book available on the ins and outs of linker scripts
> or maybe a pdf hidden away in some dark corner. Any ideas?

Unfortunately I don't know of anything better than the linker
documentation.  I wrote the docs on linker scripts--they aren't so great
now but you should have seen what they looked like before.


> One last question if I may. In my trawling about I came across the term SysV
> in terms of linker scripts. What is this?

The GNU ld linker script language was originally based on the linker
script language used in the SVR3 linker.  It's changed a lot since then,
though.  (At some point the GNU linker also got support for the MRI
linker script language, but it is not widely used.  I hope.)

Ian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]