zhenguoli
zhenguoli

Reputation: 2308

Linux ld: What's the meaning of `-m` option and the command `ld -melf_32 -Ttext 0 -e startup_32`

I have read the ld manual, the -m emulation option refers to emulate the emulation linker, what's the meaning of the description. And the -T scriptfile option can use scriptfile as the linker script, but what the option -Ttext 0 refers to, is it valid?

Upvotes: 1

Views: 566

Answers (1)

xvan
xvan

Reputation: 4855

-Ttext 0 tells the linker to start the program at address 0

15.3 Linker emulation selection

A linker emulation is a "personality" of the linker, which gives the linker default values for the other aspects of the target system. In particular, it consists of

the linker script

the target

several "hook" functions that are run at certain stages of the linking process to do special things that some targets require

http://ftp.gnu.org/old-gnu/Manuals/binutils/html_node/binutils_20.html

Upvotes: 1

Related Questions