warning: allocated section `.data_nosave' not in segment

Sean MacLennan smaclennan at pikatech.com
Tue Sep 29 09:24:54 EST 2009


Here is the ld -M output for the "bad" compile:

.data_nosave    0xc0376790      0x870 load address 0x00376790
                0xc0377000                . = ALIGN (0x1000)
 *fill*         0xc0376790      0x870 00
                0xc0377000                __nosave_begin = .
 *(.data.nosave)
                0xc0377000                . = ALIGN (0x1000)
                0xc0377000                __nosave_end = .
                0xc0377000                . = ALIGN (0x1000)
                0xc0377000                _edata = .
                0xc0377000                PROVIDE (edata, .)
                0xc0377000                . = ALIGN (0x0)
                0xc0377000                __bss_start = .
                0xc0377000                . = ALIGN (0x0)

.sbss           0xc0377000      0xad0 load address 0x00377000

Here is the ld -M output for a "good" compile (i.e. align before
the .data_nosave:

                0xc0377000                . = ALIGN (0x1000)

.data_nosave    0xc0377000        0x0 load address 0x00377000
                0xc0377000                __nosave_begin = .
 *(.data.nosave)
                0xc0377000                . = ALIGN (0x1000)
                0xc0377000                __nosave_end = .
                0xc0377000                . = ALIGN (0x1000)
                0xc0377000                _edata = .
                0xc0377000                PROVIDE (edata, .)
                0xc0377000                . = ALIGN (0x0)
                0xc0377000                __bss_start = .
                0xc0377000                . = ALIGN (0x0)

.sbss           0xc0377000      0xad0 load address 0x00377000

It looks like putting the align before the .data.nosave puts all the
labels at the same address. Putting it *after* allows the .data_nosave
to be in a different page than the labels.

I can provide more info if needed. But it looks like everything is
nicely aligned, until the data_nosave, which needs the alignment. The
section before it is one of the few with stuff in it.

Cheers,
   Sean 


More information about the Linuxppc-dev mailing list