HardenedBSD/sys/conf/ldscript.mips.octeon1
Alex Richardson 0823672d94 Fix linking OCTEON1 kernel with LLD
LLD complains that the type of .dynamic was changed. Fix this by copying
the approach used in the mips64 ldscript.
I do not have hardware to test this change so I only verified that the
kernel links and the section layout looks sensible.

Reviewed By:	imp, emaste
Differential Revision: https://reviews.freebsd.org/D24093
2020-03-22 22:18:00 +00:00

67 lines
895 B
Plaintext

/* $FreeBSD$ */
ENTRY(_start)
PHDRS {
text PT_LOAD FLAGS(0x7);
}
SECTIONS {
. = KERNLOADADDR + SIZEOF_HEADERS;
.text : {
*(.text)
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);
}
.plt : { *(.plt) }
_gp = ALIGN(16) + 0x7ff0;
.got : { *(.got.plt) *(.got) }
.dynamic : { *(.dynamic) }
.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 = .;
}
}