Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1384)

Side by Side Diff: elf/Makefile

Issue 7715030: Fix dynamic library linking. (Closed) Base URL: http://git.chromium.org/native_client/nacl-glibc.git@master
Patch Set: Comment added Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | nacl/dyn-link/ldscripts/elf64_nacl.xs » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 1995-2007, 2008 Free Software Foundation, Inc. 1 # Copyright (C) 1995-2007, 2008 Free Software Foundation, Inc.
2 # This file is part of the GNU C Library. 2 # This file is part of the GNU C Library.
3 3
4 # The GNU C Library is free software; you can redistribute it and/or 4 # The GNU C Library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public 5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either 6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version. 7 # version 2.1 of the License, or (at your option) any later version.
8 8
9 # The GNU C Library is distributed in the hope that it will be useful, 9 # The GNU C Library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 $(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a 298 $(objpfx)librtld.os: $(objpfx)dl-allobjs.os $(objpfx)rtld-libc.a
299 $(LINK.o) -nostdlib -nostartfiles -r -o $@ '-Wl,-(' $^ -lgcc '-Wl,-)' \ 299 $(LINK.o) -nostdlib -nostartfiles -r -o $@ '-Wl,-(' $^ -lgcc '-Wl,-)' \
300 -Wl,-Map,$@.map 300 -Wl,-Map,$@.map
301 301
302 generated += librtld.map librtld.mk rtld-libc.a librtld.os.map 302 generated += librtld.map librtld.mk rtld-libc.a librtld.os.map
303 303
304 z-now-yes = -Wl,-z,now 304 z-now-yes = -Wl,-z,now
305 305
306 $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map) 306 $(objpfx)ld.so: $(objpfx)librtld.os $(ld-map)
307 @rm -f $@.lds 307 @rm -f $@.lds
308 # NaCl loader refuses to run ld.so with more than 3 loadable segments.
309 # Remove the bss segment.
308 $(LINK.o) -nostdlib -nostartfiles -shared $(z-now-$(bind-now)) \ 310 $(LINK.o) -nostdlib -nostartfiles -shared $(z-now-$(bind-now)) \
309 $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \ 311 $(LDFLAGS-rtld) -Wl,-z,defs -Wl,--verbose 2>&1 | \
310 LC_ALL=C \ 312 LC_ALL=C \
311 » » sed -e '/^=========/,/^=========/!d;/^=========/d'» \ 313 » » sed -e '/^=========/,/^=========/!d;/^=========/d' \
312 -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADE RS;/' \ 314 -e 's/\. = 0 + SIZEOF_HEADERS;/& _begin = . - SIZEOF_HEADE RS;/' \
315 -e 's/_end = \.; PROVIDE (end = \.);/& . = DATA_SEGMENT_EN D(.);/' \
316 -e 's/seg_bss PT_LOAD FLAGS(6) ; \/\* read + wr ite \*\///' \
317 -e 's/} :seg_bss/}/' \
318 -e 's/\. = DATA_SEGMENT_END (\.);//' \
319 -e 's/\. = ALIGN (CONSTANT (MAXPAGESIZE));//' \
320 -e 's/\. = ALIGN (CONSTANT (COMMONPAGESIZE));//' \
313 > $@.lds 321 > $@.lds
314 $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \ 322 $(LINK.o) -nostdlib -nostartfiles -shared -o $@ \
315 $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \ 323 $(LDFLAGS-rtld) -Wl,-z,defs $(z-now-$(bind-now)) \
316 $(filter-out $(map-file),$^) $(load-map-file) \ 324 $(filter-out $(map-file),$^) $(load-map-file) \
317 -Wl,-soname=$(rtld-installed-name) -T $@.lds \ 325 -Wl,-soname=$(rtld-installed-name) -T $@.lds \
318 -Wl,-Ttext,0x20000 326 -Wl,-Ttext,0x20000
319 rm -f $@.lds 327 rm -f $@.lds
320 readelf -s $@ \ 328 readelf -s $@ \
321 | $(AWK) '($$7 ~ /^UND(EF)?$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }' 329 | $(AWK) '($$7 ~ /^UND(EF)?$$/ && $$1 != "0:" && $$4 != "REGISTER") { print; p=1 } END { exit p != 0 }'
322 330
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 961
954 $(objpfx)tst-leaks1: $(libdl) 962 $(objpfx)tst-leaks1: $(libdl)
955 $(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out 963 $(objpfx)tst-leaks1-mem: $(objpfx)tst-leaks1.out
956 $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@ 964 $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks1.mtrace > $@
957 965
958 tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace 966 tst-leaks1-ENV = MALLOC_TRACE=$(objpfx)tst-leaks1.mtrace
959 967
960 $(objpfx)tst-addr1: $(libdl) 968 $(objpfx)tst-addr1: $(libdl)
961 969
962 $(objpfx)tst-thrlock: $(libdl) $(shared-thread-library) 970 $(objpfx)tst-thrlock: $(libdl) $(shared-thread-library)
OLDNEW
« no previous file with comments | « no previous file | nacl/dyn-link/ldscripts/elf64_nacl.xs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698