binutils-gdb/include
H.J. Lu a4819f54c0 Treat common symbol as undefined for --no-define-common
When --no-define-common is used to build shared library, treat common
symbol as undefined so that common symbols that are referenced from a
shared library to be assigned addresses only in the main program.  This
eliminates the unused duplicate space in the shared library, and also
prevents any possible confusion over resolving to the wrong duplicate
when there are many dynamic modules with specialized search paths for
runtime symbol resolution.

--no-define-common is only allowed when building a shared library.

bfd/

	PR ld/21903:
	* elflink.c (elf_link_add_object_symbols): Treat common symbol
	as undefined for --no-define-common.

include/

	PR ld/21903:
	* bfdlink.h (bfd_link_info): Add inhibit_common_definition.

ld/

	PR ld/21903:
	* ld.h (command_line): Remove inhibit_common_definition.
	* ldgram.y: Replace command_line.inhibit_common_definition with
	link_info.inhibit_common_definition.
	* ldlang.c (lang_common): Likewise.
	* lexsup.c (parse_args): Likewise.
	* ldmain.c (main): Only allow --no-define-common with -shared.
	* testsuite/ld-elf/pr21903.s: New file.
	* testsuite/ld-elf/pr21903a.d: Likewise.
	* testsuite/ld-elf/pr21903b.d: Likewise.
	* testsuite/ld-elf/pr21903c.d: Likewise.
	* testsuite/ld-elf/pr21903d.d: Likewise.
	* testsuite/ld-elf/pr21903e.d: Likewise.
2017-08-06 08:19:04 -07:00
..
aout Fix spelling typos. 2017-07-18 16:58:14 +01:00
cgen
coff
elf [ARC] Add JLI support. 2017-07-19 09:56:55 +02:00
gdb Fix spelling typos. 2017-07-18 16:58:14 +01:00
mach-o Fix spelling typos. 2017-07-18 16:58:14 +01:00
nlm
opcode [ARC] Add SJLI instruction. 2017-07-19 09:56:55 +02:00
som
vms
alloca-conf.h
ansidecl.h Fix compile time error when using ansidecl.h with an old version of GCC. 2017-07-31 15:08:32 +01:00
bfdlink.h Treat common symbol as undefined for --no-define-common 2017-08-06 08:19:04 -07:00
binary-io.h
bout.h
ChangeLog Treat common symbol as undefined for --no-define-common 2017-08-06 08:19:04 -07:00
ChangeLog-0415
ChangeLog-2016
ChangeLog-9103
COPYING
COPYING3
demangle.h Sync libiberty sources with GCC. 2017-03-13 17:49:32 +00:00
dis-asm.h binutils/objdump: Fix disassemble for huge elf sections 2017-07-14 22:51:01 +09:30
dwarf2.def Import include/+libiberty/ r249883 from upstream GCC. 2017-07-02 22:09:52 +02:00
dwarf2.h Import include/+libiberty/ r249883 from upstream GCC. 2017-07-02 22:09:52 +02:00
dyn-string.h
environ.h Fix MinGW compilation warnings due to environ.h 2017-05-31 09:35:07 +03:00
fibheap.h
filenames.h
floatformat.h
fnmatch.h
fopen-bin.h
fopen-same.h
fopen-vms.h
gcc-c-fe.def
gcc-c-interface.h
gcc-interface.h
getopt.h
hashtab.h
hp-symtab.h
ieee.h
leb128.h
libiberty.h Fix spelling typos. 2017-07-18 16:58:14 +01:00
longlong.h
lto-symtab.h
MAINTAINERS
md5.h
oasys.h
objalloc.h
obstack.h
os9k.h
partition.h
plugin-api.h
progress.h
safe-ctype.h
sha1.h
simple-object.h
sort.h
splay-tree.h
symcat.h
timeval-utils.h
vtv-change-permission.h
xregex2.h
xregex.h
xtensa-config.h
xtensa-isa-internal.h
xtensa-isa.h