This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: strange ld message "allocated section not in segment"
- From: Peter Barada <peter at the-baradas dot com>
- To: binutils at sources dot redhat dot com
- Date: Thu, 15 Sep 2005 16:59:31 -0400 (EDT)
- Subject: Re: strange ld message "allocated section not in segment"
I'm trying to figure out why the following message pops out of ld:
/opt/logicpd/ColdFire/m68k-elf-3.4.3/libexec/gcc/m68k-elf/3.4.3/collect2 -o led_flasher.elf -N -L/opt/logicpd/ColdFire/m68k-elf-3.4.3/lib/gcc/m68k-elf/3.4.3/m5407 -L/opt/logicpd/ColdFire/m68k-elf-3.4.3/lib/gcc/m68k-elf/3.4.3 -L/opt/logicpd/ColdFire/m68k-elf-3.4.3/lib/gcc/m68k-elf/3.4.3/../../../../m68k-elf/lib arch/m68k/apicrt0.o led_flasher.o arch/m68k/arch_led_flasher.o -lgcc -T api.ldssc
/opt/logicpd/ColdFire/m68k-elf-3.4.3/lib/gcc/m68k-elf/3.4.3/../../../../m68k-elf/bin/ld: led_flasher.elf: warning: allocated section `.bss' not in segment
Even though (if I understand correctly), I list .bss to be placed into
the 'bss' segment via the PHDRS command. Any idea why this message is
appearing? Here's the linker cmd file:
ENTRY(_start)
PHDRS
{
text PT_LOAD ;
bss PT_NULL ;
}
SECTIONS
{
. = 0xFF800000+0x00100000;
_img_start = .;
.text : { arch/m68k/apicrt0.o(.text) led_flasher.o(.text) } : text
.glue : { arch/m68k/apicrt0.o(.glue*) led_flasher.o(.glue*) } : text
.rodata : { *(.rodata*)
. = ALIGN(4);
} : text
_rom_text_start = .;
_sdram_app_start = 0x00000000 + 0x00100000;
. = _sdram_app_start + (_rom_text_start - _img_start);
.ram_text : AT (_rom_text_start)
{
_ram_text_start = .;
arch/m68k/arch_led_flasher.o(.text)
. = ALIGN(4);
_ram_text_end = .;
} : text
_data_rom_start = _rom_text_start + SIZEOF(.ram_text);
.data : AT (_data_rom_start)
{
_data_start = .;
*(.data)
. = ALIGN(4);
_data_end = .;
} : text
.bss : {
*(.bss)
} : bss
_bss = ADDR(.bss);
_ebss = ADDR(.bss) + SIZEOF(.bss);
. = ALIGN(4);
_stack = .;
. = . + (16 * 1024);
_estack = .;
.sizealign (NOLOAD) : { } = 0x0
}
--
Peter Barada
peter@the-baradas.com