freebsd-nq/sys/conf/ldscript.mips.octeon1
Ed Maste 74cd06b42e Expose the kernel's build-ID through sysctl
After our migration (of certain architectures) to lld the kernel is built
with a unique build-ID.  Make it available via a sysctl and uname(1) to
allow the user to identify their running kernel.

Submitted by:	Ali Mashtizadeh <ali_mashtizadeh.com>
MFC after:	2 weeks
Relnotes:	Yes
Event:		Waterloo Hackathon 2019
Differential Revision:	https://reviews.freebsd.org/D20326
2019-06-04 13:07:10 +00:00

66 lines
828 B
Plaintext

/* $FreeBSD$ */
ENTRY(_start)
PHDRS {
text PT_LOAD FLAGS(0x7);
}
SECTIONS {
. = KERNLOADADDR + SIZEOF_HEADERS;
.text : {
*(.text)
*(.dynamic)
etext = .;
_etext = .;
. = ALIGN(0x2000);
} : text
. = ALIGN(0x2000);
.rodata : {
_fdata = .;
*(.rodata)
. = ALIGN(32);
}
.note.gnu.build-id : {
PROVIDE (__build_id_start = .);
*(.note.gnu.build-id)
PROVIDE (__build_id_end = .);
}
.data : {
_rwdata = .;
*(.data)
. = ALIGN(32);
}
_gp = (. + 0x8000);
.sdata : {
_small_start = .;
*(.sdata)
. = ALIGN(32);
edata = .;
_edata = .;
} : text
.sbss : {
__bss_start = .;
_fbss = .;
*(.sbss) *(.scommon)
_small_end = .;
. = ALIGN(32);
}
.bss : {
*(.bss)
*(COMMON)
. = ALIGN(32);
_end = .;
end = .;
}
}