* What is the content of a linked file?
@ 2011-02-06 7:31 ali hagigat
2011-02-07 0:14 ` Alan Modra
0 siblings, 1 reply; 2+ messages in thread
From: ali hagigat @ 2011-02-06 7:31 UTC (permalink / raw)
To: binutils
Suppose we have the following ld script and i use it to link my program with it:
SECTIONS
{
.text: { *(.text) }
.rodata: { *(.rodata) }
.data: { *(.data) }
BYTE(0x00)
BYTE(0xff)
BYTE(0xcd)
}
Then i link my program by gcc and with the above linker script and say
our final output file to be prog1 which is an executable file.
If I see prog1 file content, will it have, those 3
bytes(0x00,0xff,0xcd) I specified? I mean those bytes are in the
header of prog1 ELF file? or they are written in the body of the
object file?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: What is the content of a linked file?
2011-02-06 7:31 What is the content of a linked file? ali hagigat
@ 2011-02-07 0:14 ` Alan Modra
0 siblings, 0 replies; 2+ messages in thread
From: Alan Modra @ 2011-02-07 0:14 UTC (permalink / raw)
To: ali hagigat; +Cc: binutils
On Sun, Feb 06, 2011 at 09:19:53AM +0330, ali hagigat wrote:
> Suppose we have the following ld script
Then you will get syntax errors.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-07 0:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-06 7:31 What is the content of a linked file? ali hagigat
2011-02-07 0:14 ` Alan Modra
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).