- 论坛徽章:
- 0
|
原帖由 wellbye 于 2006-4-6 13:32 发表
[code]ORG= 0x600
boot0: boot0.o
.if ${OBJFORMAT} == aout
${LD} -N -s -T ${ORG} -o boot0.out boot0.o
dd if=boot0.out of=${.TARGET} ibs=32 skip=1
.else
${LD} -N -e start -Ttext ${ORG} -o b ...
man ld 
--section-start sectionname=org
Locate a section in the output file at the absolute address given
by org. You may use this option as many times as necessary to
locate multiple sections in the command line. org must be a single
hexadecimal integer; for compatibility with other linkers, you may
omit the leading 0x usually associated with hexadecimal values.
Note: there should be no white space between sectionname, the
equals sign (``=''), and org.
-Tbss org
-Tdata org
-Ttext org
Same as --section-start, with ".bss", ".data" or ".text" as the
sectionname. |
|