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]

Re: strange ld message "allocated section not in segment"


On Thu, Sep 15, 2005 at 04:59:31PM -0400, Peter Barada wrote:
> 
> 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 ;
> }

That's your problem.  PT_NULL means "entry unused".  You really want it
to be a PT_LOAD segment.


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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