[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
How to using 'LD' to align on my AMD64?
From: |
bsdmaillist |
Subject: |
How to using 'LD' to align on my AMD64? |
Date: |
18 Aug 2006 06:57:25 -0700 |
User-agent: |
G2/0.2 |
Hello,
On my AMD64 machine, I'd like to link my object file to a image,
the image is flat, code is from 0x0000, and contains debug symbol.
I wrote a ld script file, but the output file is over 1MB !!
(I guess because the align is 0x0100000, so the ELF header is from 0x0,
the next program: .text is on 0x0100000)
So how to modify the ld script file?
Thanks in advance!!
This is my ld script file:
SECTIONS
{
. = 0x000000;
.text : { *(.text) }
. = ADDR(.text)+SIZEOF(.text);
.data : {*(.data)}
.rodata : {*(.rodata)}
.bss : {*(.bss)}
.eh_frame : {*(.eh_frame)}
_edata = ADDR(.bss)+SIZEOF(.bss)+0x04000;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- How to using 'LD' to align on my AMD64?,
bsdmaillist <=