This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

How do I get ld to pull sections from archived objects?


Hi there,

I've been trying for arm-eabi-ld (binutils 2.23.2, gcc 4.8.1, newlib
top-of tree) to pick data sections from archived objects, but it
silently ignores them. For instance:

SECTIONS
{
...
    my_special_thing ORIGIN(rom) : {
        KEEP(*(my_special_thing))
    }
...
}

If all the objects containing "my_special_thing" section are in
archives, this section never makes it to the final elf file.

I've also learn that using archive specifiers doesn't work either:

SECTIONS
{
...
    my_special_thing ORIGIN(rom) : {
        KEEP(myspecials:*(my_special_thing))
    }
...
}

as, ld keeps silently ignoring that (I've tried all forms, i.e. full
archive name and extension, with wildcards after and before, the
archive without the lib prefix, etc.), the ":" archive specifier seems
completely broken..

The only way seems to be to refer to actual object files, or, if some
dependency pulls a file from the archive for other reasons, then
"my_special_thing" section gets considered in the input section
specification above.

Is this expected? What am I doing wrong? Am I missing some command-line option?

Let me know if you need more details or to try something.

Regards.


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