This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
src/gold ChangeLog arm.cc object.cc object.h t ...
- From: ian at sourceware dot org
- To: binutils-cvs at sourceware dot org
- Date: 3 Mar 2010 19:31:54 -0000
- Subject: src/gold ChangeLog arm.cc object.cc object.h t ...
CVSROOT: /cvs/src
Module name: src
Changes by: ian@sourceware.org 2010-03-03 19:31:54
Modified files:
gold : ChangeLog arm.cc object.cc object.h
target-reloc.h
gold/testsuite : Makefile.am Makefile.in discard_locals_test.sh
Added files:
gold/testsuite : discard_locals_relocatable_test.c
Log message:
* target-reloc.h (relocate_section): Check the symbol table index
for -1U before setting the local symbol index.
(scan_relocatable_relocs): If copying the relocation, record that
the local symbol is required.
* object.h (Symbol_value::is_output_symtab_index_set): New
function.
(Symbol_value::may_be_discarded_from_output_symtab): New
function.
(Symbol_value::has_output_symtab_entry): New function.
(Symbol_value::needs_output_symtab_entry): Remove.
(Symbol_value::output_symtab_index): Make sure the symbol index is
set.
(Symbol_value::set_output_symtab_index): Make sure the symbol
index is not set. Make sure the new index is valid.
(Symbol_value::set_must_have_output_symtab_entry): New function.
(Symbol_value::has_output_dynsym_entry): New function.
(Symbol_value::set_output_dynsym_index): Make sure the new index
is valid.
(Sized_relobj::set_must_have_output_symtab_entry): New function.
* object.cc (Sized_relobj::do_count_local_symbols): Only discard a
local symbol if permitted.
(Sized_relobj::do_finalize_local_symbols): Call
is_output_symtab_index_set rather than needs_output_symtab_entry.
(Sized_relobj::write_local_symbols): Call has_output_symtab_entry
rather than needs_output_symtab_entry. Call
has_output_dynsym_entry rather than needs_output_dynsym_entry.
* arm.cc (Arm_relobj::update_output_local_symbol_count): Call
is_output_symtab_index_set rather than needs_output_symtab_entry.
* testsuite/discard_locals_relocatable_test.c: New file.
* testsuite/discard_locals_test.sh: Test -r.
* testsuite/Makefile.am (check_DATA): Add
discard_locals_relocatable_test1.syms,
discard_local_relocatable_test2.syms.
(MOSTLYCLEANFILES): Likewise. Also add
discard_locals_relocatable_test1.lout and
discard_locals_relocatable_test2.out.
(discard_locals_relocatable_test1.syms): New target.
(discard_locals_relocatable_test.o): New target.
(discard_locals_relocatable_test1.out): New target.
(discard_locals_relocatable_test2.syms): New target.
(discard_locals_relocatable_test2.out): New target.
(various): Add missing ../ld-new dependencies.
* testsuite/Makefile.in: Rebuild.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/ChangeLog.diff?cvsroot=src&r1=1.514&r2=1.515
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/arm.cc.diff?cvsroot=src&r1=1.90&r2=1.91
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/object.cc.diff?cvsroot=src&r1=1.119&r2=1.120
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/object.h.diff?cvsroot=src&r1=1.92&r2=1.93
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/target-reloc.h.diff?cvsroot=src&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/testsuite/discard_locals_relocatable_test.c.diff?cvsroot=src&r1=NONE&r2=1.1
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/testsuite/Makefile.am.diff?cvsroot=src&r1=1.124&r2=1.125
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/testsuite/Makefile.in.diff?cvsroot=src&r1=1.130&r2=1.131
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gold/testsuite/discard_locals_test.sh.diff?cvsroot=src&r1=1.1&r2=1.2