binutils-gdb/include
Alan Modra ce875075f9 PR ld/17973 LTO file syms
LTO output objects have an STT_FILE symbol using the name of the file,
a temporary file.  This results in executables that can't be exactly
reproduced, so the file name needs to be dropped.  We don't want to
lose all file symbols when linking a mix of lto and non-lto objects as
a file symbol can be used to figure which source file generated a
given local symbol.  So lto output objects need to be marked.

I chose to mark lto output objects with a new bfd flag.  This flag is
also used to fix a bug in the link-once handling;  An object being
loaded after "loading_lto_outputs" is set might be one extracted from
an archive to satisfy new references from lto objects, not an lto
object itself.

The new flag is copied from archive to elements, and the same done
for no_export.  This fixes a bug in that --exclude-libs doesn't work
with thin archives.  I'm not completely happy with this part of the
patch and may revist this to avoid the hack in
_bfd_look_for_bfd_in_cache.

	PR ld/17973
include/
	* bfdlink.h (struct bfd_link_info): Delete loading_lto_outputs.
bfd/
	* bfd.c (struct bfd): Add lto_output.
	* linker.c (_bfd_handle_already_linked): Explicitly test for
	objects added by the lto plugin.
	* opncls.c (_bfd_new_bfd_contained_in): Copy lto_output and
	no_export flags from archive.
	* archive.c (open_nested_file): New function, setting lto_output
	and no_export, extracted from..
	(find_nested_archive): ..here.  Flip params.  Rename from
	_bfd_find_nested_archive.
	(_bfd_get_elt_at_filepos): Correct var typo.  Use open_nested_file.
	(_bfd_look_for_bfd_in_cache): Copy no_export.
	* elflink.c (elf_link_add_object_symbols): Remove now unnecessary
	my_archive->no_export test.
	(elf_link_input_bfd): Drop existing lto_output STT_FILE syms.
	Don't use the file name when adding lto_output STT_FILE sym.
	* bfd-in2.h: Regenerate.
ld/
	* ldlang.h (struct lang_input_statement_flags): Add lto_output.
	* ldlang.c (lang_process): Don't set loading_lto_outputs.
	* ldfile.c (ldfile_try_open_bfd): Transfer entry flags.lto_output
	to bfd.
	* plugin.c (add_input_file, add_input_library): Set flags.lto_output.
2015-02-14 23:41:54 +10:30
..
aout ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
cgen ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
coff Fixes a buffer overflow when compiling assembler for the MinGW targets. 2015-01-06 16:46:40 +00:00
elf FT32 initial support 2015-01-28 16:25:18 +10:30
gdb Add support for inlining scripts into .debug_gdb_scripts. 2015-01-31 12:01:13 -08:00
mach-o ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
nlm ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
opcode FT32 initial support 2015-01-28 16:25:18 +10:30
som ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vms ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
COPYING Update the address and phone number of the FSF organization 2005-05-10 10:21:13 +00:00
COPYING3 * COPYING3: New file. Contains version 3 of the GNU General Public License. 2007-07-17 13:50:23 +00:00
ChangeLog PR ld/17973 LTO file syms 2015-02-14 23:41:54 +10:30
ChangeLog-9103 Add copyright notices 2012-12-10 12:48:03 +00:00
MAINTAINERS ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
alloca-conf.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ansidecl.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
bfdlink.h PR ld/17973 LTO file syms 2015-02-14 23:41:54 +10:30
binary-io.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
bout.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
demangle.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
dis-asm.h FT32 initial support 2015-01-28 16:25:18 +10:30
dwarf2.def GCC5/DWARFv5 Handle DW_TAG_atomic_type for C11 _Atomic type qualifier. 2015-02-09 15:09:22 +01:00
dwarf2.h Recognize new DWARF5/GCC5 DW_LANG constants for Fortran 03 and Fortran 08. 2015-02-10 09:07:25 +01:00
dyn-string.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fibheap.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
filenames.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
floatformat.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fnmatch.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fopen-bin.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fopen-same.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
fopen-vms.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gcc-c-fe.def ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gcc-c-interface.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
gcc-interface.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
getopt.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hashtab.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
hp-symtab.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
ieee.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
leb128.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
libiberty.h Merge include/libiberty.h from GCC 2015-01-14 22:15:02 +01:00
longlong.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
lto-symtab.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
md5.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
oasys.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
objalloc.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
obstack.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
os9k.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
partition.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
plugin-api.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
progress.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
safe-ctype.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sha1.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
simple-object.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
sort.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
splay-tree.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
symcat.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
timeval-utils.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
vtv-change-permission.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xregex.h merge from gcc 2011-07-25 17:11:48 +00:00
xregex2.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xtensa-config.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xtensa-isa-internal.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
xtensa-isa.h ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30