* object.h (Sized_relobj_file::emit_relocs): Delete.

(Sized_relobj_file::emit_relocs_reltype): Delete.
	* reloc.cc (Sized_relobj_file::do_relocate_sections): Call target
	relocate_relocs for --emit-relocs.
	(Sized_relobj_file::emit_relocs, emit_relocs_reltype): Delete.
	* output.h: Update comment.
	(Output_segment::first_section): New function.
	(Output_segment::first_section_load_address): Use first_section.
	* output.cc (Output_segment::first_section): New function extracted..
	(Output_segment::first_section_load_address): ..from here.  Delete.
	* target-reloc.h (relocate_for_relocatable): Rename to relocate_relocs.
	* target.h (Sized_target::relocate_for_relocatable): Likewise.
	* arm.cc (Target_arm::relocate_for_relocatable): Likewise, and
	adjust call to target.h function.
	* i386.cc (Target_i386): Likewise.
	* sparc.cc (Target_sparc): Likewise.
	* x86_64.cc (Target_x86_64): Likewise.
	* powerpc.cc (Target_powerpc): Likewise.
	(Target_powerpc::Scan::local, global): Handle R_POWERPC_TLS.  Ensure
	first tls section has section symbol for optimised local dynamic
	output relocs.
	(Target_powerpc::Relocate::relocate): Correct local dynamic value.
	(Target_powerpc::relocate_relocs): Adjust relocs emitted for
	optimised tls code.
	* testsuite/testfile.cc (Target_test::relocate_for_relocatable):
	Rename to relocate_relocs.  Update error message.
This commit is contained in:
Alan Modra
2012-09-05 00:34:20 +00:00
parent f54ae065b8
commit 7404fe1b8d
13 changed files with 325 additions and 235 deletions

View File

@@ -4613,10 +4613,10 @@ Output_segment::set_tls_offsets()
(*p)->set_tls_offset(this->vaddr_);
}
// Return the load address of the first section.
// Return the first section.
uint64_t
Output_segment::first_section_load_address() const
Output_section*
Output_segment::first_section() const
{
for (int i = 0; i < static_cast<int>(ORDER_MAX); ++i)
{
@@ -4626,9 +4626,7 @@ Output_segment::first_section_load_address() const
++p)
{
if ((*p)->is_section())
return ((*p)->has_load_address()
? (*p)->load_address()
: (*p)->address());
return (*p)->output_section();
}
}
gold_unreachable();