This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
faq regarding
- To: binutils at sourceware dot cygnus dot com
- Subject: faq regarding
- From: Ivan Pulleyn <ivan at torpid dot com>
- Date: Fri, 15 Sep 2000 11:48:43 -0500 (CDT)
Hi,
My apoligies if this is horribly off-topic or a total FAQ.
I'm trying to create an ld script for a mini-kernel for x86. I need
hints on how to control the format of the output. My current script
looks like this:
OUTPUT_FORMAT(binary);
SECTIONS
{
.text : { *(.text) }
.data : { *(.data) }
.bss : { *(.bss) }
}
I found the "binary" output format using objdump -i, but I'm not
really sure it's correct. I want to avoid any kind of fixup at run
time and have the linker write out a image to disk that I can later
just load and run from the boot sector.
My current problem is that if I declare something like:
static int foo[0x10000];
GCC emits:
.local foo
.comm foo,262144,32
The resulting image produced by LD does not change in size. Does this
mean LD is emiting something I have to fixup before executing? BTW,
info says that the 3rd argument to .comm is ELF specific, is that
true?
Thanks in advance for your help!
Ivan...
---------------------------------------------------------------------------
Ivan Pulleyn
4942 N. Winchester Ave. #3
Chicago, IL 60640
ivan@torpid.com
(847) 980-1400
---------------------------------------------------------------------------