tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

DATAADDR (-Tdata XXX)



There is a make variable called `DATAADDR', provided by
sys/conf/Makefile.kern.inc for MD kernel build, to pass `-Tdata XXX'
to ${LD}.  `${LD} -Tdata XXX' sets output's data section address at
`XXX'.

I don't think this is useful, because:

o When kernel maps .data with page, .data needs to be aligned to page
size, and .data address is only known in prior only when .text (+
.rodata) size is known.

  o This can be written much easier using linker script.

o When kernel maps .text/.data in the same way, .data doesn't need
page alignment, and it can be placed just after .text (+ .rodata).

  o No need to specify -Tdata XXX.

Nothing uses ${DATAADDR} under src/sys.

The only use of `-Tdata XXX' under src/sys is
`src/sys/arch/hppa/stand/xxboot/Makefile', which verifies that .data
content is identical regardless of its address.  This is not affected
by DATAADDR.

Thus I believe DATAADDR can be safely removed.


Home | Main Index | Thread Index | Old Index