summaryrefslogtreecommitdiffstats
path: root/lib/csu/amd64
diff options
context:
space:
mode:
Diffstat (limited to 'lib/csu/amd64')
-rw-r--r--lib/csu/amd64/Makefile6
-rw-r--r--lib/csu/amd64/crt1.c1
-rw-r--r--lib/csu/amd64/crti.S15
-rw-r--r--lib/csu/amd64/crtn.S9
4 files changed, 20 insertions, 11 deletions
diff --git a/lib/csu/amd64/Makefile b/lib/csu/amd64/Makefile
index 70e66b1..2082a70 100644
--- a/lib/csu/amd64/Makefile
+++ b/lib/csu/amd64/Makefile
@@ -2,11 +2,11 @@
# $FreeBSD$
#
-SRCS= crt1.c crtbegin.c crtend.c crti.S crtn.S
+SRCS= crt1.c crti.S crtn.S
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
OBJS+= gcrt1.o
-SOBJS= crtbegin.So crtend.So
-CFLAGS+= -elf -Wall -fkeep-inline-functions
+CFLAGS+= -elf -Wall -fkeep-inline-functions \
+ -I${.CURDIR}/../common
LDFLAGS+= -elf
NOMAN= true
NOPIC= true
diff --git a/lib/csu/amd64/crt1.c b/lib/csu/amd64/crt1.c
index 0ee0702..ad1d25f 100644
--- a/lib/csu/amd64/crt1.c
+++ b/lib/csu/amd64/crt1.c
@@ -31,6 +31,7 @@
#include <stddef.h>
#include <stdlib.h>
+#include "crtbrand.c"
typedef void (*fptr)(void);
diff --git a/lib/csu/amd64/crti.S b/lib/csu/amd64/crti.S
index 536d2c2..82b262f 100644
--- a/lib/csu/amd64/crti.S
+++ b/lib/csu/amd64/crti.S
@@ -25,7 +25,14 @@
* $FreeBSD$
*/
-/*
- * This file is not used any more. It will go away as soon as the gcc
- * linker specs have been updated accordingly.
- */
+ .section .init,"ax",@progbits
+ .align 4
+ .globl _init
+ .type _init,@function
+_init:
+
+ .section .fini,"ax",@progbits
+ .align 4
+ .globl _fini
+ .type _fini,@function
+_fini:
diff --git a/lib/csu/amd64/crtn.S b/lib/csu/amd64/crtn.S
index 536d2c2..361ab1e 100644
--- a/lib/csu/amd64/crtn.S
+++ b/lib/csu/amd64/crtn.S
@@ -25,7 +25,8 @@
* $FreeBSD$
*/
-/*
- * This file is not used any more. It will go away as soon as the gcc
- * linker specs have been updated accordingly.
- */
+ .section .init,"ax",@progbits
+ ret
+
+ .section .fini,"ax",@progbits
+ ret
OpenPOWER on IntegriCloud