This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [GOLD] powerpc .got symbol
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Date: Tue, 4 Dec 2012 13:43:06 +1030
- Subject: Re: [GOLD] powerpc .got symbol
- References: <20121130044754.GK4842@bubble.grove.modra.org>
On Fri, Nov 30, 2012 at 03:17:54PM +1030, Alan Modra wrote:
> I chose instead to define the symbol
> early, checking once per object file.
When I wrote that it occurred to me that it would be better to check
once after all the object file symbols have been read. Like so.
* powerpc.cc (Powerpc_relobj::do_scan_relocs): Delete.
(Target_powerpc::do_define_standard_symbols): New function.
Index: gold/powerpc.cc
===================================================================
RCS file: /cvs/src/src/gold/powerpc.cc,v
retrieving revision 1.72
diff -u -p -r1.72 powerpc.cc
--- gold/powerpc.cc 3 Dec 2012 05:30:59 -0000 1.72
+++ gold/powerpc.cc 4 Dec 2012 01:13:29 -0000
@@ -201,12 +201,6 @@ public:
void
do_read_relocs(Read_relocs_data*);
- // Set up some symbols, then perform Sized_relobj_file method.
- // Occurs after garbage collection, which is why opd info can't be
- // set up here.
- void
- do_scan_relocs(Symbol_table*, Layout*, Read_relocs_data*);
-
bool
do_find_special_sections(Read_symbols_data* sd);
@@ -403,6 +397,9 @@ class Target_powerpc : public Sized_targ
Stub_table<size, big_endian>*
new_stub_table();
+ void
+ do_define_standard_symbols(Symbol_table*, Layout*);
+
// Finalize the sections.
void
do_finalize_sections(Layout*, const Input_objects*, Symbol_table*);
@@ -1540,13 +1537,13 @@ Powerpc_relobj<size, big_endian>::do_rea
}
}
-// Set up some symbols, then perform Sized_relobj_file method.
+// Set up some symbols.
template<int size, bool big_endian>
void
-Powerpc_relobj<size, big_endian>::do_scan_relocs(Symbol_table* symtab,
- Layout* layout,
- Read_relocs_data* rd)
+Target_powerpc<size, big_endian>::do_define_standard_symbols(
+ Symbol_table* symtab,
+ Layout* layout)
{
if (size == 32)
{
@@ -1588,7 +1585,6 @@ Powerpc_relobj<size, big_endian>::do_sca
0, false, false);
}
}
- Sized_relobj_file<size, big_endian>::do_scan_relocs(symtab, layout, rd);
}
// Set up PowerPC target specific relobj.
--
Alan Modra
Australia Development Lab, IBM