Print this page
crt: Need a position-independent CRT for PIE
- Implement the greatest possible part of the crt1 in C
- Implement SPARC versions of the ASM sections of crt1
- Build crt1 position-independently, minor ASM updates to be position
independent
- Implement crt1 with the hook expected by modern GCC to support
profiling, make gcrt1 a symlink for source compatibility (older GCC
initializes profiling at firsnt use of _mcount if necessary, so
doesn't need the gcrt)
- Split the CRT out of developer/library/lint into a separate c-runtime package
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/cmd/sgs/rtld/amd64/Makefile
+++ new/usr/src/cmd/sgs/rtld/amd64/Makefile
1 1 #
2 2 # CDDL HEADER START
3 3 #
4 4 # The contents of this file are subject to the terms of the
5 5 # Common Development and Distribution License (the "License").
6 6 # You may not use this file except in compliance with the License.
7 7 #
8 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 # or http://www.opensolaris.org/os/licensing.
10 10 # See the License for the specific language governing permissions
11 11 # and limitations under the License.
12 12 #
13 13 # When distributing Covered Code, include this CDDL HEADER in each
14 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 15 # If applicable, add the following below this CDDL HEADER, with the
16 16 # fields enclosed by brackets "[]" replaced with your own identifying
17 17 # information: Portions Copyright [yyyy] [name of copyright owner]
18 18 #
19 19 # CDDL HEADER END
20 20 #
21 21
22 22 #
23 23 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 #
25 25
26 26 BASEPLAT = amd64
27 27
28 28 # Object lists are organized into primary (most frequently used code) and
29 29 # secondary lists (less frequently used code, ie. a.out support).
30 30
31 31 P_COMOBJS= debugdata.o \
32 32 analyze.o elf.o external.o globals.o \
33 33 malloc.o paths.o setup.o util.o \
34 34 dlfcns.o config_elf.o locale.o tsort.o \
35 35 remove.o move.o tls.o cap.o
36 36
37 37 S_COMOBJS= debug.o audit.o object.o
38 38
39 39 G_MACHOBJS= doreloc.o
40 40
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
41 41 P_MACHOBJS= amd64_elf.o _setup.o dlamd64getunwind.o
42 42
43 43 CP_MACHOBJS=
44 44
45 45 S_MACHOBJS=
46 46
47 47 P_ASOBJS= boot.o boot_elf.o caller.o
48 48
49 49 S_ASOBJS=
50 50
51 -CRTSRCS= ../../../../lib/common/amd64
51 +CRTSRCS= ../../../../lib/crt/amd64
52 52 CRTI= pics/crti.o
53 53 CRTN= pics/crtn.o
54 54 CRTS= $(CRTI) $(CRTN)
55 55
56 56 include $(SRC)/cmd/sgs/rtld/Makefile.com
57 57 include $(SRC)/lib/Makefile.lib.64
58 58
59 59 # We build 64-bit objects with gcc by default
60 60 MAPFILE-ORDER = ../common/mapfile-order-devpro
61 61 $(__GNUC64)MAPFILE-ORDER = ../common/mapfile-order-gcc
62 62
63 63 # Add any machine specific flags.
64 64
65 65 CFLAGS += -xregs=no%appl
66 66 ASFLAGS += -D__amd64 -D_ELF64 $(amd64_ASFLAGS)
67 67 ADBGENFLAGS += -mlp64
68 68 ADBGENCFLAGS += -erroff=%all
69 69 ADBSUB= $(ADBSUB64)
70 70 CPPFLAGS += -D_ELF64
71 71 LINTFLAGS64 += $(VAR_LINTFLAGS64)
72 72 SONAME= /lib/amd64/ld.so.1
73 73
74 74 SGSMSGTARG += $(SGSMSGINTEL) $(SGSMSGINTEL64) $(SGSMSG64)
75 75
76 76 LDLIB = -L ../../libld/$(MACH64)
77 77 RTLDLIB = -L ../../librtld/$(MACH64)
78 78
79 79 CPICLIB = $(CPICLIB64)
80 80 LDDBGLIBDIR = $(LDDBGLIBDIR64)
81 81 CONVLIBDIR = $(CONVLIBDIR64)
82 82
83 83 .KEEP_STATE:
84 84
85 85 all: $(RTLD)
86 86
87 87 install: all $(ROOTDYNLIB64)
88 88
89 89 lint: $(LINTOUT64)
90 90
91 91 adbmacros: adb .WAIT $(ADBSCRIPTS)
92 92
93 93 adbinstall: adbmacros .WAIT $(ROOTADB64)
94 94
95 95 include $(SRC)/cmd/sgs/rtld/Makefile.targ
96 96 include ../../Makefile.sub.64
↓ open down ↓ |
35 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX