Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105966879
D25304.id73339.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
10 KB
Referenced Files
None
Subscribers
None
D25304.id73339.diff
View Options
Index: lib/csu/Makefile.inc
===================================================================
--- lib/csu/Makefile.inc
+++ lib/csu/Makefile.inc
@@ -10,6 +10,7 @@
OBJS+= crtbegin.o crtbeginS.o crtbeginT.o
OBJS+= crtend.o crtendS.o
+OBJS+= crti.o
ACFLAGS+= -DLOCORE
@@ -18,6 +19,8 @@
CFLAGS_CRTS= -DSHARED ${PICFLAG}
+CLEANFILES+= crti_s.o
+
crtbegin.o: crtbegin.c
crtbeginS.o: crtbegin.c
crtbeginT.o: crtbegin.c
@@ -31,6 +34,12 @@
${CC} ${CFLAGS} -I${.CURDIR} ${CFLAGS_CRTS} -c -o ${.TARGET} \
${.ALLSRC:N*.h:[1]}
+crti_s.o: crti.S
+ ${CC} ${CFLAGS} ${ACFLAGS} -c ${.ALLSRC} -o ${.TARGET}
+
+crti.o: crti_s.o crtbrand.o
+ ${LD} ${_LDFLAGS} -o ${.TARGET} -r ${.ALLSRC:M*.o}
+
.endif
.include "../Makefile.inc"
Index: lib/csu/aarch64/Makefile
===================================================================
--- lib/csu/aarch64/Makefile
+++ lib/csu/aarch64/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
Index: lib/csu/aarch64/crt1_s.S
===================================================================
--- lib/csu/aarch64/crt1_s.S
+++ lib/csu/aarch64/crt1_s.S
@@ -32,7 +32,7 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
-#include "crtbrand.S"
+#include "feature_note.S"
#include "ignore_init_note.S"
ENTRY(_start)
Index: lib/csu/amd64/Makefile
===================================================================
--- lib/csu/amd64/Makefile
+++ lib/csu/amd64/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \
@@ -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 <bsd.lib.mk>
Index: lib/csu/arm/Makefile
===================================================================
--- lib/csu/arm/Makefile
+++ lib/csu/arm/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
Index: lib/csu/arm/crt1_s.S
===================================================================
--- lib/csu/arm/crt1_s.S
+++ lib/csu/arm/crt1_s.S
@@ -44,7 +44,8 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
-#include "crtbrand.S"
+#include <sys/param.h>
+#include "feature_note.S"
#include "ignore_init_note.S"
ENTRY(_start)
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 <machine/asm.h>
__FBSDID("$FreeBSD$");
-#include <sys/param.h>
#include <sys/elf_common.h>
#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/Makefile
===================================================================
--- lib/csu/i386/Makefile
+++ lib/csu/i386/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \
Index: lib/csu/i386/crt1_s.S
===================================================================
--- lib/csu/i386/crt1_s.S
+++ lib/csu/i386/crt1_s.S
@@ -25,7 +25,7 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
-#include "crtbrand.S"
+#include "feature_note.S"
#include "ignore_init_note.S"
.text
Index: lib/csu/mips/Makefile
===================================================================
--- lib/csu/mips/Makefile
+++ lib/csu/mips/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
@@ -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 <bsd.lib.mk>
Index: lib/csu/powerpc/Makefile
===================================================================
--- lib/csu/powerpc/Makefile
+++ lib/csu/powerpc/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S crtsavres.S
+SRCS= crtn.S crtsavres.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
@@ -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 <bsd.lib.mk>
Index: lib/csu/powerpc64/Makefile
===================================================================
--- lib/csu/powerpc64/Makefile
+++ lib/csu/powerpc64/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o crtsavres.o gcrt1.o
CFLAGS+= -I${.CURDIR} -I${.CURDIR:H}/common \
@@ -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 <bsd.lib.mk>
Index: lib/csu/riscv/Makefile
===================================================================
--- lib/csu/riscv/Makefile
+++ lib/csu/riscv/Makefile
@@ -2,7 +2,7 @@
.PATH: ${.CURDIR:H}/common
-SRCS= crti.S crtn.S
+SRCS= crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= Scrt1.o crt1.o gcrt1.o
CFLAGS+= -I${.CURDIR:H}/common \
Index: lib/csu/riscv/crt1_s.S
===================================================================
--- lib/csu/riscv/crt1_s.S
+++ lib/csu/riscv/crt1_s.S
@@ -36,7 +36,7 @@
#include <machine/asm.h>
__FBSDID("$FreeBSD$");
-#include "crtbrand.S"
+#include "feature_note.S"
#include "ignore_init_note.S"
ENTRY(_start)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Dec 24, 5:37 AM (18 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15585705
Default Alt Text
D25304.id73339.diff (10 KB)
Attached To
Mode
D25304: Include ABI note tag in shared libraries.
Attached
Detach File
Event Timeline
Log In to Comment