> $arm-linux-androideabi-objdump -d obj/local/armeabi/hello
>
> As you can see, there is no "puts@plt" synthetic symbol created, and
> the invocation within the program code is left as a negative address
> in relation to the first known symbol.
Managed to solve my problem - objdump now displays the function@plt
names is the disassembly of both the .plt and program code which calls
them.
Patch follows... I suppose it's time to figure out how to use gerrit.
Which version of binutils would it be appropriate to submit against? I
tried this on 2.21 but see there are lots in the git package. Or
should it go upstream to someone else and only then back into android?
--- bfd/elf32-arm-orig.c 2012-06-27 16:12:27.000000000 -0400
+++ bfd/elf32-arm.c 2012-06-27 16:31:05.000000000 -0400
@@ -13898,6 +13898,21 @@
#define elf_backend_obj_attrs_order elf32_arm_obj_attrs_order
#define elf_backend_obj_attrs_handle_unknown
elf32_arm_obj_attrs_handle_unknown
+/* Changes to enable decoding of function@plt symbols for android */
+#undef elf_backend_plt_sym_val
+#define elf_backend_plt_sym_val elf32_arm_android_plt_sym_val
+
+/* Return address for Ith PLT stub in section PLT, for relocation REL
+ or (bfd_vma) -1 if it should not be included. */
+
+static bfd_vma
+elf32_arm_android_plt_sym_val (bfd_vma i, const asection *plt,
+ const arelent *rel ATTRIBUTE_UNUSED)
+{
+ return plt->vma + 4 * (
+ ARRAY_SIZE(elf32_arm_plt0_entry) +
+ ARRAY_SIZE(elf32_arm_plt_entry) * i);
+}
#include "elf32-target.h"
/* VxWorks Targets. */