[PATCH][GOLD] Fix just_symbols failure on ARM.
Doug Kwan (關振德)
dougkwan@google.com
Fri Nov 11 21:33:00 GMT 2011
Hi,
This patch fixes a testsuite failure caused by not handling
--just-symbols in the ARM backend.
-Doug
2011-11-11 Doug Kwan <dougkwan@google.com>
* arm.cc (Target_arm::do_make_elf_object): Allow executable also
if --just-symbols is given.
-------------- next part --------------
Index: gold/arm.cc
===================================================================
RCS file: /cvs/src/src/gold/arm.cc,v
retrieving revision 1.142
diff -u -u -p -r1.142 arm.cc
--- gold/arm.cc 10 Nov 2011 20:53:36 -0000 1.142
+++ gold/arm.cc 11 Nov 2011 21:26:49 -0000
@@ -10008,7 +10008,10 @@ Target_arm<big_endian>::do_make_elf_obje
off_t offset, const elfcpp::Ehdr<32, big_endian>& ehdr)
{
int et = ehdr.get_e_type();
- if (et == elfcpp::ET_REL)
+ // ET_EXEC files are valid input for --just-symbols/-R,
+ // and we treat them as relocatable objects.
+ if (et == elfcpp::ET_REL
+ || (et == elfcpp::ET_EXEC && input_file->just_symbols()))
{
Arm_relobj<big_endian>* obj =
new Arm_relobj<big_endian>(name, input_file, offset, ehdr);
More information about the Binutils
mailing list