Re: .gnu.linkonce.? and .gcc_except_table

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

 



John Farmer <news02@xxxxxxxxxxx> writes:

> In my .text output section the input sections include .gnu.linkonce.t*
> amongst others.
>
> I understand that it is possible under some circumstances for one or more
> sections to have the same name.
>
> Is it possible to cause this to happen deliberately, just for my own
> curiosity, from within a C program? If so how would it be done? If not
> possible using C how about using C++.

I'm not sure exactly what you are asking.  Are you asking how to have
more than one section with the same name?  I assume you mean across a
set of input files--it's unusual for a single input file to have
multiple input sections with the same name.  Across input files, it is
routine; for example, by default, all ordinary code will be put into the
.text section in each input file.

> When the linker sees two input sections with the same name are we saying
> that it only ever keeps one copy or are we saying that only if it starts
> with the special .gnu.linkonce. prefix is just one section kept?

Only if it starts with the special .gnu.linkonce. prefix.  Otherwise all
input sections with the same name are normally combined into an output
section with that name.

There is a lot of basic information about linkers in my blog entries
starting at http://airs.com/blog/archives/38 .

Ian

[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