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/sparc/Makefile
+++ new/usr/src/cmd/sgs/rtld/sparc/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) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 #
25 25
26 26 # Object lists are organized into primary (most frequently used code) and
27 27 # secondary lists (less frequently used code, ie. a.out support).
28 28
29 29 P_COMOBJS= debugdata.o \
30 30 analyze.o elf.o external.o globals.o \
31 31 malloc.o paths.o setup.o util.o \
32 32 dlfcns.o config_elf.o locale.o tsort.o \
33 33 remove.o move.o tls.o cap.o
34 34
35 35 S_COMOBJS= debug.o audit.o object.o cache_a.out.o \
36 36 a.out.o
37 37
38 38 G_MACHOBJS= doreloc.o
39 39
↓ open down ↓ |
39 lines elided |
↑ open up ↑ |
40 40 P_MACHOBJS= sparc_elf.o _setup.o
41 41
42 42 CP_MACHOBJS= common_sparc.o
43 43
44 44 S_MACHOBJS= sparc_a.out.o
45 45
46 46 P_ASOBJS= boot.o boot_elf.o caller.o
47 47
48 48 S_ASOBJS= boot_a.out.o
49 49
50 -CRTSRCS= ../../../../lib/common/sparc
50 +CRTSRCS= ../../../../lib/crt/sparcv7
51 51 CRTI= pics/crti.o
52 52 CRTN= pics/crtn.o
53 53 CRTS= $(CRTI) $(CRTN)
54 54
55 55 CHKSRCS= $(SRCBASE)/uts/common/krtld/reloc.h
56 56
57 57 BASEPLAT = sparc
58 58
59 59 include $(SRC)/Makefile.master
60 60
61 61 # This is safe because linking is done only with the primary compiler.
62 62 MAPFILE-ORDER = ../common/mapfile-order-devpro
63 63 $(__GNUC)MAPFILE-ORDER = ../common/mapfile-order-gcc
64 64
65 65 include $(SRC)/cmd/sgs/rtld/Makefile.com
66 66
67 67 # Add any a.out and machine specific flags.
68 68
69 69 CPPFLAGS += -I../../../../uts/sparc/krtld -DA_OUT
70 70 CFLAGS += -xregs=no%appl
71 71 ASFLAGS += -K pic
72 72 LINTFLAGS += -DA_OUT
73 73 ADBGENCFLAGS += -erroff=%all
74 74 ADBGENFLAGS += -milp32
75 75 ADBSUB= $(ADBSUB32)
76 76 SONAME= /lib/ld.so.1
77 77
78 78 SGSMSGTARG += $(SGSMSGSPARC) $(SGSMSGSPARC32) $(SGSMSG32)
79 79
80 80 .KEEP_STATE:
81 81
82 82 all: $(RTLD)
83 83
84 84 install: all $(ROOTDYNLIB)
85 85
86 86 lint: $(LINTOUT32)
87 87
88 88 adbmacros: adb .WAIT $(ADBSCRIPTS)
89 89
90 90 adbinstall: adbmacros .WAIT $(ROOTADB)
91 91
92 92 include $(SRC)/cmd/sgs/rtld/Makefile.targ
↓ open down ↓ |
32 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX