Re: Input section question

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

 



John Farmer <news02@xxxxxxxxxxx> writes:

> I have a linker script file and have a question regarding its input section
> syntax. I have looked over the internet but cannot find any information on
> this.
>
> The input section is specificed as *(.init .init.*) and not just *(.init) as
> I would have expected. 
>
> The .init within the parenthesis means any object file that contains an
> .init section. But I don't quite understand what the .init.* means. 
>
> Intuitively it looks as though it is saying also include object files that
> start with .init. (for example .init.a, .init.any) or perhaps object files
> that start with just .init (for example .inita or .initany). Would any of
> these be close?

Questions about using the linker are often better directed to
binutils@xxxxxxxxxxxxxxx  See http://sourceware.org/binutils/ .

In your example, ".init.*" is a specification for an input section, and
it means that all input sections whose names match the shell pattern
".init.*" will be put into the output section being defined.  E.g.,
input sections named .init.foo, .init.bar, etc. will all go into the
output section.  That is, input section names, not input file names as
you suggest.  This is all documented in the linker manual, which is
included in the linker source or reachable on the web off of the
binutils web page mentioned above.

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