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]

Unrelocated output sections


Hi,

for a bootloader I'm building a binary image with a PT_LOAD segment for
the initial overlay handler and several segments with custom p_type
numbers for program modules. That works fine so far.

Now I need to add a relocatable segment as well, that should be loaded
by the overlay manager to an address not known to me at link time, so
I'd like to generate an additional segment with the relocation
information for a specific other segment.

Is it possible to somehow generate this from a linker script, possibly
similar to

    PHDRS {
        manager PT_LOAD PHDRS;
        module1 0x60000000;
        module2 0x60000001;
        movable 0x60000002;
        movable_dyn 0x68000002;
    }

    SECTIONS {
        .text.manager { ... } :manager
        .text.module1 { ... } :module1
        /* ... */
        .text.movable { movable/*(.text*) /* ... */ } :movable
        .dyn.movable { movable/*(.dyn*) /* ... */ } :movable_dyn
    }

Is it possible to have LD create an output binary that contains
relocation information for the "movable" segment even if the rest of the
system is fully linked?

   Simon

Attachment: signature.asc
Description: OpenPGP digital signature


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