Query Regarding BSS in ELF.
Thu Jun 21 18:31:00 GMT 2001
I found the same problem.
I would suggest using objcopy with -R flags to remove the section
when creating your binary, srec, or hex file.
From: Arvind Tiwari <email@example.com>
To: firstname.lastname@example.org <email@example.com>
Date: Friday, June 22, 2001 11:13 AM
Subject: Query Regarding BSS in ELF.
> I am trying to make a cross compiler on HPUX B 10.20 Operating
>System for target M68k-MOTOROLA-ELF. The cross compiler
>builds without any problem. The problem comes when i try to build an
>executable using this cross-compiler. The executable actually is
>reserving quite a huge amount of space allocated for .bss section (the
>global uninitialized data) which is consuming all my memory
> Earlier i was working with m68k-motorola-coff format cross
>compiler on the same host platform and it was not allocating any space
>for .bss section.
> Is there any way besides changing the code of bfd / ld by which i
>reduce this .bss section contents to zero which means the actual size of
>.bss section is allocated only at the run time by the linker ?
> I have tried doing it via changing the default ld scripts for linker
>(which is elf.sc in my case) but it is not solving my problem.
> Is there any option of ld using which will prevent allocation of
>to .bss section ?
> Actually, i know that i can specifically remove ".bss" section using
>objcopy but in my case i wish to have .bss section which should be
>allocated its space only at the runtime.
> In case i need to change the code of bfd / ld can anyone suggest
>pointers from where to start ....
>thanxs in advance.
>p.s. I am currently using binutils-2.9.1 and gcc-2.95.2 packages
>to build the cross compiler.
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to firstname.lastname@example.org
More information about the crossgcc