Index: lib/csu/aarch64/crt1_s.S =================================================================== --- lib/csu/aarch64/crt1_s.S +++ lib/csu/aarch64/crt1_s.S @@ -32,7 +32,7 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" +#include "feature_note.S" #include "ignore_init_note.S" ENTRY(_start) Index: lib/csu/aarch64/crti.S =================================================================== --- lib/csu/aarch64/crti.S +++ lib/csu/aarch64/crti.S @@ -30,6 +30,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + .section .init,"ax",@progbits .align 4 .globl _init Index: lib/csu/amd64/Makefile =================================================================== --- lib/csu/amd64/Makefile +++ lib/csu/amd64/Makefile @@ -18,21 +18,21 @@ .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o +CLEANFILES+= feature_note.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o +gcrt1.o: gcrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o gcrt1.o -r ${.ALLSRC} -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o +crt1.o: crt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o crt1.o -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o +Scrt1.o: Scrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o Scrt1.o -r ${.ALLSRC} .include Index: lib/csu/amd64/crti.S =================================================================== --- lib/csu/amd64/crti.S +++ lib/csu/amd64/crti.S @@ -26,6 +26,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + .section .init,"ax",@progbits .align 4 .globl _init Index: lib/csu/arm/crt1_s.S =================================================================== --- lib/csu/arm/crt1_s.S +++ lib/csu/arm/crt1_s.S @@ -44,7 +44,8 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" +#include +#include "feature_note.S" #include "ignore_init_note.S" ENTRY(_start) Index: lib/csu/arm/crti.S =================================================================== --- lib/csu/arm/crti.S +++ lib/csu/arm/crti.S @@ -1,6 +1,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + .section .init,"ax",%progbits .align 4 .globl _init Index: lib/csu/common/crtbrand.S =================================================================== --- lib/csu/common/crtbrand.S +++ lib/csu/common/crtbrand.S @@ -46,14 +46,4 @@ 1: .asciz NOTE_FREEBSD_VENDOR 2: .p2align 2 3: .4byte __FreeBSD_version -4: - - .section .note.tag,"a",%note - .p2align 2 - .4byte 2f-1f - .4byte 4f-3f - .4byte NT_FREEBSD_FEATURE_CTL -1: .asciz NOTE_FREEBSD_VENDOR -2: .p2align 2 -3: .4byte 0 4: Index: lib/csu/common/feature_note.S =================================================================== --- lib/csu/common/feature_note.S +++ lib/csu/common/feature_note.S @@ -28,26 +28,9 @@ #include __FBSDID("$FreeBSD$"); -#include #include #include "notes.h" -/* - * Special ".note.tag" entry specifying the ABI version. See - * http://www.netbsd.org/Documentation/kernel/elf-notes.html - * for more information. - */ - - .section .note.tag,"a",%note - .p2align 2 - .4byte 2f-1f - .4byte 4f-3f - .4byte NT_FREEBSD_ABI_TAG -1: .asciz NOTE_FREEBSD_VENDOR -2: .p2align 2 -3: .4byte __FreeBSD_version -4: - .section .note.tag,"a",%note .p2align 2 .4byte 2f-1f Index: lib/csu/i386/crt1_s.S =================================================================== --- lib/csu/i386/crt1_s.S +++ lib/csu/i386/crt1_s.S @@ -25,7 +25,7 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" +#include "feature_note.S" #include "ignore_init_note.S" .text Index: lib/csu/i386/crti.S =================================================================== --- lib/csu/i386/crti.S +++ lib/csu/i386/crti.S @@ -26,6 +26,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + .section .init,"ax",@progbits .align 4 .globl _init Index: lib/csu/mips/Makefile =================================================================== --- lib/csu/mips/Makefile +++ lib/csu/mips/Makefile @@ -18,21 +18,21 @@ .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o +CLEANFILES+= feature_note.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o +gcrt1.o: gcrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o gcrt1.o -r ${.ALLSRC} -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o +crt1.o: crt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o crt1.o -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o +Scrt1.o: Scrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o Scrt1.o -r ${.ALLSRC} .include Index: lib/csu/mips/crti.S =================================================================== --- lib/csu/mips/crti.S +++ lib/csu/mips/crti.S @@ -1,6 +1,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + #ifndef __clang__ .gnu_attribute 4, 0 #endif Index: lib/csu/powerpc/Makefile =================================================================== --- lib/csu/powerpc/Makefile +++ lib/csu/powerpc/Makefile @@ -18,21 +18,21 @@ .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o +CLEANFILES+= feature_note.o ignore_init_note.o gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o +gcrt1.o: gcrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o gcrt1.o -r ${.ALLSRC} -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o +crt1.o: crt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o crt1.o -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o +Scrt1.o: Scrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o Scrt1.o -r ${.ALLSRC} .include Index: lib/csu/powerpc/crti.S =================================================================== --- lib/csu/powerpc/crti.S +++ lib/csu/powerpc/crti.S @@ -26,6 +26,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + .section .init,"ax",@progbits .align 2 .globl _init Index: lib/csu/powerpc64/Makefile =================================================================== --- lib/csu/powerpc64/Makefile +++ lib/csu/powerpc64/Makefile @@ -18,7 +18,7 @@ .undef LIBRARIES_ONLY CLEANFILES= ${OBJS} crt1_c.o gcrt1_c.o Scrt1_c.o -CLEANFILES+= crtbrand.o ignore_init_note.o +CLEANFILES+= feature_note.o ignore_init_note.o CLEANFILES+= crtsavres.S # On powerpc64 crtsavres is an empty file @@ -28,16 +28,16 @@ gcrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -DGCRT -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -gcrt1.o: gcrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o gcrt1.o -r crtbrand.o ignore_init_note.o gcrt1_c.o +gcrt1.o: gcrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o gcrt1.o -r ${.ALLSRC} -crt1.o: crt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o crt1.o -r crtbrand.o ignore_init_note.o crt1_c.o +crt1.o: crt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o crt1.o -r ${.ALLSRC} Scrt1_c.o: crt1_c.c ${CC} ${CFLAGS} -fPIC -DPIC -c -o ${.TARGET} ${.CURDIR}/crt1_c.c -Scrt1.o: Scrt1_c.o crtbrand.o ignore_init_note.o - ${LD} ${_LDFLAGS} -o Scrt1.o -r crtbrand.o ignore_init_note.o Scrt1_c.o +Scrt1.o: Scrt1_c.o feature_note.o ignore_init_note.o + ${LD} ${_LDFLAGS} -o Scrt1.o -r ${.ALLSRC} .include Index: lib/csu/powerpc64/crti.S =================================================================== --- lib/csu/powerpc64/crti.S +++ lib/csu/powerpc64/crti.S @@ -26,6 +26,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + #ifdef _CALL_ELF .abiversion _CALL_ELF #endif Index: lib/csu/riscv/crt1_s.S =================================================================== --- lib/csu/riscv/crt1_s.S +++ lib/csu/riscv/crt1_s.S @@ -36,7 +36,7 @@ #include __FBSDID("$FreeBSD$"); -#include "crtbrand.S" +#include "feature_note.S" #include "ignore_init_note.S" ENTRY(_start) Index: lib/csu/riscv/crti.S =================================================================== --- lib/csu/riscv/crti.S +++ lib/csu/riscv/crti.S @@ -35,6 +35,8 @@ #include __FBSDID("$FreeBSD$"); +#include "crtbrand.S" + # this puts __global_pointer$ into .dynsym, so symlook_obj can now find that # (see reloc.c) .weak __global_pointer$