include/elf/

* arm.h (R_ARM_IRELATIVE): New relocation.

bfd/
	* reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
	* bfd-in2.h: Regenerate.
	* elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
	to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
	entry.
	(elf32_arm_howto_from_type): Update accordingly.
	(elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
	(elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
	(arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
	with an extra noncall_refcount field.
	(arm_local_iplt_info): New structure.
	(elf_arm_obj_tdata): Add local_iplt.
	(elf32_arm_local_iplt): New accessor macro.
	(elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
	plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
	Change tls_type to a bitfield and add is_iplt.
	(elf32_arm_link_hash_newfunc): Update accordingly.
	(elf32_arm_allocate_local_sym_info): New function.
	(elf32_arm_create_local_iplt): Likewise.
	(elf32_arm_get_plt_info): Likewise.
	(elf32_arm_plt_needs_thumb_stub_p): Likewise.
	(elf32_arm_get_local_dynreloc_list): Likewise.
	(create_ifunc_sections): Likewise.
	(elf32_arm_copy_indirect_symbol): Update after the changes to
	elf32_arm_link_hash_entry.  Assert the is_iplt has not yet been set.
	(arm_type_of_stub): Add an st_type argument.  Use elf32_arm_get_plt_info
	to get PLT information.  Assert that all STT_GNU_IFUNC references
	are turned into PLT references.
	(arm_build_one_stub): Pass the symbol type to
	elf32_arm_final_link_relocate.
	(elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
	(elf32_arm_allocate_irelocs): New function.
	(elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
	all R_ARM_IRELATIVE.
	(elf32_arm_allocate_plt_entry): New function.
	(elf32_arm_populate_plt_entry): Likewise.
	(elf32_arm_final_link_relocate): Add an st_type parameter.
	Set srelgot to null for static objects.  Use separate variables
	to record which st_value and st_type should be used when generating
	a dynamic relocation.  Use elf32_arm_get_plt_info to find the
	symbol's PLT information, setting has_iplt_entry, splt,
	plt_offset and gotplt_offset accordingly.  Check whether
	STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
	the relocation target accordingly.  Broaden assert to include
	.iplts.  Don't set sreloc for static relocations.  Assert that
	we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
	and R_ARM_ABS32_NOI.  Generate R_ARM_IRELATIVE relocations instead
	of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
	symbol.  Pass the symbol type to arm_type_of_stub.  Conditionally
	resolve GOT references to the .igot.plt entry.
	(elf32_arm_relocate_section): Update the call to
	elf32_arm_final_link_relocate.
	(elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
	information.  Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
	relocations in shared libraries and relocatable executables.
	Count non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
	to get the list of dynamic relocations for a local symbol.
	(elf32_arm_check_relocs): Always create ifunc sections.  Set isym
	at the same time as setting h.  Use elf32_arm_allocate_local_sym_info
	to allocate local symbol information.  Treat R_ARM_REL32 and
	R_ARM_REL32_NOI as call relocations in shared libraries and
	relocatable executables.  Record PLT information for local
	STT_GNU_IFUNC functions as well as global functions.   Count
	non-call PLT references.  Use elf32_arm_get_local_dynreloc_list
	to get the list of dynamic relocations for a local symbol.
	(elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
	Don't remove STT_GNU_IFUNC PLTs unless all references have been
	removed.  Update after the changes to elf32_arm_link_hash_entry.
	(allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
	entries should live in .plt or .iplt.  Check whether the .igot.plt
	and .got entries can be combined.  Use elf32_arm_allocate_plt_entry
	to allocate .plt and .(i)got.plt entries.  Detect which .got
	entries will need R_ARM_IRELATIVE relocations and use
	elf32_arm_allocate_irelocs to allocate them.  Likewise other
	non-.got dynamic relocations.
	(elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
	and dynamic relocations for local STT_GNU_IFUNC symbols.
	Check whether the .igot.plt and .got entries can be combined.
	Detect which .got entries will need R_ARM_IRELATIVE relocations
	and use elf32_arm_allocate_irelocs to allocate them.  Use stashed
	section pointers intead of strcmp checks.  Handle iplt and igotplt.
	(elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
	to fill in .plt, .got.plt and .rel(a).plt entries.  Point
	STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
	resolve to it.
	(elf32_arm_output_plt_map_1): New function, split out from
	elf32_arm_output_plt_map.  Handle .iplt entries.  Use
	elf32_arm_plt_needs_thumb_stub_p.
	(elf32_arm_output_plt_map): Call it.
	(elf32_arm_output_arch_local_syms): Add mapping symbols for
	local .iplt entries.
	(elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
	(elf32_arm_swap_symbol_out): Likewise.
	(elf32_arm_add_symbol_hook): New function.
	(elf_backend_add_symbol_hook): Define for all targets.

opcodes/
	* arm-dis.c (get_sym_code_type): Treat STT_GNU_IFUNCs as code.

gas/
	* config/tc-arm.c (md_pcrel_from_section): Use S_FORCE_RELOC to
	determine whether a relocation is needed.
	(md_apply_fix, arm_apply_sym_value): Likewise.

ld/testsuite/
	* ld-arm/ifunc-1.s, ld-arm/ifunc-1.dd, ld-arm/ifunc-1.gd,
	ld-arm/ifunc-1.rd, ld-arm/ifunc-2.s, ld-arm/ifunc-2.dd,
	ld-arm/ifunc-2.gd, ld-arm/ifunc-2.rd, ld-arm/ifunc-3.s,
	ld-arm/ifunc-3.dd, ld-arm/ifunc-3.gd, ld-arm/ifunc-3.rd,
	ld-arm/ifunc-4.s, ld-arm/ifunc-4.dd, ld-arm/ifunc-4.gd,
	ld-arm/ifunc-4.rd, ld-arm/ifunc-5.s, ld-arm/ifunc-5.dd,
	ld-arm/ifunc-5.gd, ld-arm/ifunc-5.rd, ld-arm/ifunc-6.s,
	ld-arm/ifunc-6.dd, ld-arm/ifunc-6.gd, ld-arm/ifunc-6.rd,
	ld-arm/ifunc-7.s, ld-arm/ifunc-7.dd, ld-arm/ifunc-7.gd,
	ld-arm/ifunc-7.rd, ld-arm/ifunc-8.s, ld-arm/ifunc-8.dd,
	ld-arm/ifunc-8.gd, ld-arm/ifunc-8.rd, ld-arm/ifunc-9.s,
	ld-arm/ifunc-9.dd, ld-arm/ifunc-9.gd, ld-arm/ifunc-9.rd,
	ld-arm/ifunc-10.s, ld-arm/ifunc-10.dd, ld-arm/ifunc-10.gd,
	ld-arm/ifunc-10.rd, ld-arm/ifunc-11.s, ld-arm/ifunc-11.dd,
	ld-arm/ifunc-11.gd, ld-arm/ifunc-11.rd, ld-arm/ifunc-12.s,
	ld-arm/ifunc-12.dd, ld-arm/ifunc-12.gd, ld-arm/ifunc-12.rd,
	ld-arm/ifunc-13.s, ld-arm/ifunc-13.dd, ld-arm/ifunc-13.gd,
	ld-arm/ifunc-13.rd, ld-arm/ifunc-14.s, ld-arm/ifunc-14.dd,
	ld-arm/ifunc-14.gd, ld-arm/ifunc-14.rd, ld-arm/ifunc-15.s,
	ld-arm/ifunc-15.dd, ld-arm/ifunc-15.gd, ld-arm/ifunc-15.rd,
	ld-arm/ifunc-16.s, ld-arm/ifunc-16.dd, ld-arm/ifunc-16.gd,
	ld-arm/ifunc-16.rd, ld-arm/ifunc-dynamic.ld,
	ld-arm/ifunc-static.ld: New tests.
	* ld-arm/farcall-group.d, ld-arm/farcall-group-size2.d,
	ld-arm/farcall-mixed-lib-v4t.d, ld-arm/farcall-mixed-lib.d: Update
	for new stub hashes.
	* ld-arm/arm-elf.exp: Run them.
This commit is contained in:
Richard Sandiford 2011-03-14 16:04:16 +00:00
parent 37b50a69d6
commit 34e77a920a
82 changed files with 8547 additions and 531 deletions

View File

@ -1,3 +1,101 @@
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* reloc.c (BFD_RELOC_ARM_IRELATIVE): New relocation.
* bfd-in2.h: Regenerate.
* elf32-arm.c (elf32_arm_howto_table_2): Rename existing definition
to elf32_arm_howto_table_3 and replace with a single R_ARM_IRELATIVE
entry.
(elf32_arm_howto_from_type): Update accordingly.
(elf32_arm_reloc_map): Map BFD_RELOC_ARM_IRELATIVE to R_ARM_IRELATIVE.
(elf32_arm_reloc_name_lookup): Handle elf32_arm_howto_table_3.
(arm_plt_info): New structure, split out from elf32_arm_link_hash_entry
with an extra noncall_refcount field.
(arm_local_iplt_info): New structure.
(elf_arm_obj_tdata): Add local_iplt.
(elf32_arm_local_iplt): New accessor macro.
(elf32_arm_link_hash_entry): Replace plt_thumb_refcount,
plt_maybe_thumb_refcount and plt_got_offset with an arm_plt_info.
Change tls_type to a bitfield and add is_iplt.
(elf32_arm_link_hash_newfunc): Update accordingly.
(elf32_arm_allocate_local_sym_info): New function.
(elf32_arm_create_local_iplt): Likewise.
(elf32_arm_get_plt_info): Likewise.
(elf32_arm_plt_needs_thumb_stub_p): Likewise.
(elf32_arm_get_local_dynreloc_list): Likewise.
(create_ifunc_sections): Likewise.
(elf32_arm_copy_indirect_symbol): Update after the changes to
elf32_arm_link_hash_entry. Assert the is_iplt has not yet been set.
(arm_type_of_stub): Add an st_type argument. Use elf32_arm_get_plt_info
to get PLT information. Assert that all STT_GNU_IFUNC references
are turned into PLT references.
(arm_build_one_stub): Pass the symbol type to
elf32_arm_final_link_relocate.
(elf32_arm_size_stubs): Pass the symbol type to arm_type_of_stub.
(elf32_arm_allocate_irelocs): New function.
(elf32_arm_add_dynreloc): In static objects, use .rel.iplt for
all R_ARM_IRELATIVE.
(elf32_arm_allocate_plt_entry): New function.
(elf32_arm_populate_plt_entry): Likewise.
(elf32_arm_final_link_relocate): Add an st_type parameter.
Set srelgot to null for static objects. Use separate variables
to record which st_value and st_type should be used when generating
a dynamic relocation. Use elf32_arm_get_plt_info to find the
symbol's PLT information, setting has_iplt_entry, splt,
plt_offset and gotplt_offset accordingly. Check whether
STT_GNU_IFUNC symbols should resolve to an .iplt entry, and change
the relocation target accordingly. Broaden assert to include
.iplts. Don't set sreloc for static relocations. Assert that
we only generate dynamic R_ARM_RELATIVE relocations for R_ARM_ABS32
and R_ARM_ABS32_NOI. Generate R_ARM_IRELATIVE relocations instead
of R_ARM_RELATIVE relocations if the target is an STT_GNU_IFUNC
symbol. Pass the symbol type to arm_type_of_stub. Conditionally
resolve GOT references to the .igot.plt entry.
(elf32_arm_relocate_section): Update the call to
elf32_arm_final_link_relocate.
(elf32_arm_gc_sweep_hook): Use elf32_arm_get_plt_info to get PLT
information. Treat R_ARM_REL32 and R_ARM_REL32_NOI as call
relocations in shared libraries and relocatable executables.
Count non-call PLT references. Use elf32_arm_get_local_dynreloc_list
to get the list of dynamic relocations for a local symbol.
(elf32_arm_check_relocs): Always create ifunc sections. Set isym
at the same time as setting h. Use elf32_arm_allocate_local_sym_info
to allocate local symbol information. Treat R_ARM_REL32 and
R_ARM_REL32_NOI as call relocations in shared libraries and
relocatable executables. Record PLT information for local
STT_GNU_IFUNC functions as well as global functions. Count
non-call PLT references. Use elf32_arm_get_local_dynreloc_list
to get the list of dynamic relocations for a local symbol.
(elf32_arm_adjust_dynamic_symbol): Handle STT_GNU_IFUNC symbols.
Don't remove STT_GNU_IFUNC PLTs unless all references have been
removed. Update after the changes to elf32_arm_link_hash_entry.
(allocate_dynrelocs_for_symbol): Decide whether STT_GNU_IFUNC PLT
entries should live in .plt or .iplt. Check whether the .igot.plt
and .got entries can be combined. Use elf32_arm_allocate_plt_entry
to allocate .plt and .(i)got.plt entries. Detect which .got
entries will need R_ARM_IRELATIVE relocations and use
elf32_arm_allocate_irelocs to allocate them. Likewise other
non-.got dynamic relocations.
(elf32_arm_size_dynamic_sections): Allocate .iplt, .igot.plt
and dynamic relocations for local STT_GNU_IFUNC symbols.
Check whether the .igot.plt and .got entries can be combined.
Detect which .got entries will need R_ARM_IRELATIVE relocations
and use elf32_arm_allocate_irelocs to allocate them. Use stashed
section pointers intead of strcmp checks. Handle iplt and igotplt.
(elf32_arm_finish_dynamic_symbol): Use elf32_arm_populate_plt_entry
to fill in .plt, .got.plt and .rel(a).plt entries. Point
STT_GNU_IFUNC symbols at an .iplt entry if non-call relocations
resolve to it.
(elf32_arm_output_plt_map_1): New function, split out from
elf32_arm_output_plt_map. Handle .iplt entries. Use
elf32_arm_plt_needs_thumb_stub_p.
(elf32_arm_output_plt_map): Call it.
(elf32_arm_output_arch_local_syms): Add mapping symbols for
local .iplt entries.
(elf32_arm_swap_symbol_in): Handle Thumb STT_GNU_IFUNC symbols.
(elf32_arm_swap_symbol_out): Likewise.
(elf32_arm_add_symbol_hook): New function.
(elf_backend_add_symbol_hook): Define for all targets.
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* elf-bfd.h (elf_link_hash_entry): Add target_internal.

View File

@ -3186,6 +3186,9 @@ pc-relative or some form of GOT-indirect relocation. */
/* Annotation of BX instructions. */
BFD_RELOC_ARM_V4BX,
/* ARM support for STT_GNU_IFUNC. */
BFD_RELOC_ARM_IRELATIVE,
/* These relocs are only used within the ARM assembler. They are not
(at present) written to any object files. */
BFD_RELOC_ARM_IMMEDIATE,

File diff suppressed because it is too large Load Diff

View File

@ -3041,6 +3041,11 @@ ENUM
ENUMDOC
Annotation of BX instructions.
ENUM
BFD_RELOC_ARM_IRELATIVE
ENUMDOC
ARM support for STT_GNU_IFUNC.
ENUM
BFD_RELOC_ARM_IMMEDIATE
ENUMX

View File

@ -1,3 +1,9 @@
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* config/tc-arm.c (md_pcrel_from_section): Use S_FORCE_RELOC to
determine whether a relocation is needed.
(md_apply_fix, arm_apply_sym_value): Likewise.
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* config/tc-arm.c (arm_adjust_symtab): Set the branch type

View File

@ -19750,7 +19750,7 @@ md_pcrel_from_section (fixS * fixP, segT seg)
case BFD_RELOC_THUMB_PCREL_BRANCH23:
if (fixP->fx_addsy
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& (!S_IS_EXTERNAL (fixP->fx_addsy))
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& ARM_IS_FUNC (fixP->fx_addsy)
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t))
base = fixP->fx_where + fixP->fx_frag->fr_address;
@ -19761,7 +19761,7 @@ md_pcrel_from_section (fixS * fixP, segT seg)
case BFD_RELOC_THUMB_PCREL_BLX:
if (fixP->fx_addsy
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& (!S_IS_EXTERNAL (fixP->fx_addsy))
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& THUMB_IS_FUNC (fixP->fx_addsy)
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t))
base = fixP->fx_where + fixP->fx_frag->fr_address;
@ -19772,7 +19772,7 @@ md_pcrel_from_section (fixS * fixP, segT seg)
case BFD_RELOC_ARM_PCREL_BLX:
if (fixP->fx_addsy
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& (!S_IS_EXTERNAL (fixP->fx_addsy))
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& ARM_IS_FUNC (fixP->fx_addsy)
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t))
base = fixP->fx_where + fixP->fx_frag->fr_address;
@ -19781,7 +19781,7 @@ md_pcrel_from_section (fixS * fixP, segT seg)
case BFD_RELOC_ARM_PCREL_CALL:
if (fixP->fx_addsy
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& (!S_IS_EXTERNAL (fixP->fx_addsy))
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& THUMB_IS_FUNC (fixP->fx_addsy)
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t))
base = fixP->fx_where + fixP->fx_frag->fr_address;
@ -20595,7 +20595,7 @@ md_apply_fix (fixS * fixP,
if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)
&& fixP->fx_addsy
&& !S_IS_EXTERNAL (fixP->fx_addsy)
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& THUMB_IS_FUNC (fixP->fx_addsy))
/* Flip the bl to blx. This is a simple flip
@ -20615,7 +20615,7 @@ md_apply_fix (fixS * fixP,
case BFD_RELOC_ARM_PCREL_JUMP:
if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)
&& fixP->fx_addsy
&& !S_IS_EXTERNAL (fixP->fx_addsy)
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& THUMB_IS_FUNC (fixP->fx_addsy))
{
@ -20638,7 +20638,7 @@ md_apply_fix (fixS * fixP,
temp = 1;
if (ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)
&& fixP->fx_addsy
&& !S_IS_EXTERNAL (fixP->fx_addsy)
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& ARM_IS_FUNC (fixP->fx_addsy))
{
@ -20746,8 +20746,7 @@ md_apply_fix (fixS * fixP,
case BFD_RELOC_THUMB_PCREL_BRANCH20:
if (fixP->fx_addsy
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& !S_IS_EXTERNAL (fixP->fx_addsy)
&& S_IS_DEFINED (fixP->fx_addsy)
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& ARM_IS_FUNC (fixP->fx_addsy)
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t))
{
@ -20785,8 +20784,7 @@ md_apply_fix (fixS * fixP,
about it. */
if (fixP->fx_addsy
&& S_IS_DEFINED (fixP->fx_addsy)
&& !S_IS_EXTERNAL (fixP->fx_addsy)
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& THUMB_IS_FUNC (fixP->fx_addsy))
{
@ -20810,8 +20808,7 @@ md_apply_fix (fixS * fixP,
is converted to a blx. */
if (fixP->fx_addsy
&& (S_GET_SEGMENT (fixP->fx_addsy) == seg)
&& !S_IS_EXTERNAL (fixP->fx_addsy)
&& S_IS_DEFINED (fixP->fx_addsy)
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE)
&& ARM_IS_FUNC (fixP->fx_addsy)
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t))
{
@ -23716,7 +23713,7 @@ arm_apply_sym_value (struct fix * fixP)
{
if (fixP->fx_addsy
&& ARM_CPU_HAS_FEATURE (selected_cpu, arm_ext_v5t)
&& !S_IS_EXTERNAL (fixP->fx_addsy))
&& !S_FORCE_RELOC (fixP->fx_addsy, TRUE))
{
switch (fixP->fx_r_type)
{

View File

@ -1,3 +1,7 @@
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* arm.h (R_ARM_IRELATIVE): New relocation.
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* internal.h (elf_internal_sym): Add st_target_internal.

View File

@ -226,6 +226,8 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
RELOC_NUMBER (R_ARM_ME_TOO, 128) /* obsolete */
RELOC_NUMBER (R_ARM_THM_TLS_DESCSEQ ,129)
RELOC_NUMBER (R_ARM_IRELATIVE, 160)
/* Extensions? R=read-only? */
RELOC_NUMBER (R_ARM_RXPC25, 249)
RELOC_NUMBER (R_ARM_RSBREL32, 250)

View File

@ -1,3 +1,33 @@
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* ld-arm/ifunc-1.s, ld-arm/ifunc-1.dd, ld-arm/ifunc-1.gd,
ld-arm/ifunc-1.rd, ld-arm/ifunc-2.s, ld-arm/ifunc-2.dd,
ld-arm/ifunc-2.gd, ld-arm/ifunc-2.rd, ld-arm/ifunc-3.s,
ld-arm/ifunc-3.dd, ld-arm/ifunc-3.gd, ld-arm/ifunc-3.rd,
ld-arm/ifunc-4.s, ld-arm/ifunc-4.dd, ld-arm/ifunc-4.gd,
ld-arm/ifunc-4.rd, ld-arm/ifunc-5.s, ld-arm/ifunc-5.dd,
ld-arm/ifunc-5.gd, ld-arm/ifunc-5.rd, ld-arm/ifunc-6.s,
ld-arm/ifunc-6.dd, ld-arm/ifunc-6.gd, ld-arm/ifunc-6.rd,
ld-arm/ifunc-7.s, ld-arm/ifunc-7.dd, ld-arm/ifunc-7.gd,
ld-arm/ifunc-7.rd, ld-arm/ifunc-8.s, ld-arm/ifunc-8.dd,
ld-arm/ifunc-8.gd, ld-arm/ifunc-8.rd, ld-arm/ifunc-9.s,
ld-arm/ifunc-9.dd, ld-arm/ifunc-9.gd, ld-arm/ifunc-9.rd,
ld-arm/ifunc-10.s, ld-arm/ifunc-10.dd, ld-arm/ifunc-10.gd,
ld-arm/ifunc-10.rd, ld-arm/ifunc-11.s, ld-arm/ifunc-11.dd,
ld-arm/ifunc-11.gd, ld-arm/ifunc-11.rd, ld-arm/ifunc-12.s,
ld-arm/ifunc-12.dd, ld-arm/ifunc-12.gd, ld-arm/ifunc-12.rd,
ld-arm/ifunc-13.s, ld-arm/ifunc-13.dd, ld-arm/ifunc-13.gd,
ld-arm/ifunc-13.rd, ld-arm/ifunc-14.s, ld-arm/ifunc-14.dd,
ld-arm/ifunc-14.gd, ld-arm/ifunc-14.rd, ld-arm/ifunc-15.s,
ld-arm/ifunc-15.dd, ld-arm/ifunc-15.gd, ld-arm/ifunc-15.rd,
ld-arm/ifunc-16.s, ld-arm/ifunc-16.dd, ld-arm/ifunc-16.gd,
ld-arm/ifunc-16.rd, ld-arm/ifunc-dynamic.ld,
ld-arm/ifunc-static.ld: New tests.
* ld-arm/farcall-group.d, ld-arm/farcall-group-size2.d,
ld-arm/farcall-mixed-lib-v4t.d, ld-arm/farcall-mixed-lib.d: Update
for new stub hashes.
* ld-arm/arm-elf.exp: Run them.
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* ld-arm/arm-lib-plt-2a.s, ld-arm/arm-lib-plt-2b.s,

View File

@ -311,6 +311,88 @@ set armelftests {
"" {exec-got-1b.s}
{{readelf --relocs exec-got-1.d}}
"exec-got-1"}
{"IFUNC test 1" "-T ifunc-static.ld" "" {ifunc-1.s}
{{objdump -d ifunc-1.dd}
{objdump {-s -j.data -j.got} ifunc-1.gd}
{readelf -dr ifunc-1.rd}}
"ifunc-1"}
{"IFUNC test 2" "-T ifunc-static.ld" "" {ifunc-2.s}
{{objdump -d ifunc-2.dd}
{objdump {-s -j.data -j.got} ifunc-2.gd}
{readelf -dr ifunc-2.rd}}
"ifunc-2"}
{"IFUNC test 3" "-T ifunc-dynamic.ld -shared" "" {ifunc-3.s}
{{objdump -d ifunc-3.dd}
{objdump {-s -j.data -j.got} ifunc-3.gd}
{readelf -r ifunc-3.rd}}
"ifunc-3.so"}
{"IFUNC test 4" "-T ifunc-dynamic.ld -shared" "" {ifunc-4.s}
{{objdump -d ifunc-4.dd}
{objdump {-s -j.data -j.got} ifunc-4.gd}
{readelf -r ifunc-4.rd}}
"ifunc-4.so"}
{"IFUNC test 5" "-T ifunc-static.ld" "" {ifunc-5.s}
{{objdump -d ifunc-5.dd}
{objdump {-s -j.data -j.got} ifunc-5.gd}
{readelf -dr ifunc-5.rd}}
"ifunc-5"}
{"IFUNC test 6" "-T ifunc-static.ld" "" {ifunc-6.s}
{{objdump -d ifunc-6.dd}
{objdump {-s -j.data -j.got} ifunc-6.gd}
{readelf -dr ifunc-6.rd}}
"ifunc-6"}
{"IFUNC test 7" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so -shared"
"" {ifunc-7.s}
{{objdump -d ifunc-7.dd}
{objdump {-s -j.data -j.got} ifunc-7.gd}
{readelf -r ifunc-7.rd}}
"ifunc-7.so"}
{"IFUNC test 8" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so -shared"
"" {ifunc-8.s}
{{objdump -d ifunc-8.dd}
{objdump {-s -j.data -j.got} ifunc-8.gd}
{readelf -r ifunc-8.rd}}
"ifunc-8.so"}
{"IFUNC test 9" "-T ifunc-dynamic.ld tmpdir/ifunc-3.so" "" {ifunc-9.s}
{{objdump -d ifunc-9.dd}
{objdump {-s -j.data -j.got} ifunc-9.gd}
{readelf -r ifunc-9.rd}}
"ifunc-9"}
{"IFUNC test 10" "-T ifunc-dynamic.ld tmpdir/ifunc-4.so" "" {ifunc-10.s}
{{objdump -d ifunc-10.dd}
{objdump {-s -j.data -j.got} ifunc-10.gd}
{readelf -r ifunc-10.rd}}
"ifunc-10"}
{"IFUNC test 11" "-T ifunc-static.ld" "" {ifunc-11.s}
{{objdump -d ifunc-11.dd}
{objdump {-s -j.data -j.got} ifunc-11.gd}
{readelf -dr ifunc-11.rd}}
"ifunc-11"}
{"IFUNC test 12" "-T ifunc-dynamic.ld -shared" "" {ifunc-12.s}
{{objdump -d ifunc-12.dd}
{objdump {-s -j.data -j.got} ifunc-12.gd}
{readelf -r ifunc-12.rd}}
"ifunc-12.so"}
{"IFUNC test 13" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" {ifunc-13.s}
{{objdump -d ifunc-13.dd}
{objdump {-s -j.data -j.got} ifunc-13.gd}
{readelf -r ifunc-13.rd}}
"ifunc-13"}
{"IFUNC test 14" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" {ifunc-14.s}
{{objdump -d ifunc-14.dd}
{objdump {-s -j.data -j.got} ifunc-14.gd}
{readelf -r ifunc-14.rd}}
"ifunc-14"}
{"IFUNC test 15" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" {ifunc-15.s}
{{objdump -d ifunc-15.dd}
{objdump {-s -j.data -j.got} ifunc-15.gd}
{readelf -r ifunc-15.rd}}
"ifunc-15"}
{"IFUNC test 16" "-T ifunc-dynamic.ld tmpdir/ifunc-12.so" "" {ifunc-16.s}
{{objdump -d ifunc-16.dd}
{objdump {-s -j.data -j.got} ifunc-16.gd}
{readelf -r ifunc-16.rd}}
"ifunc-16"}
}
run_ld_link_tests $armelftests

View File

@ -19,19 +19,19 @@ Disassembly of section .text:
00001020 <myfunc>:
1020: eb000008 bl 1048 <__bar3_veneer>
1024: eb000001 bl 1030 <__bar4_from_arm>
1028: eb000003 bl 103c <__bar5_from_arm>
1024: eb000004 bl 103c <__bar4_from_arm>
1028: eb000000 bl 1030 <__bar5_from_arm>
102c: 00000000 andeq r0, r0, r0
00001030 <__bar4_from_arm>:
1030: e59fc000 ldr ip, \[pc, #0\] ; 1038 <__bar4_from_arm\+0x8>
00001030 <__bar5_from_arm>:
1030: e59fc000 ldr ip, \[pc, #0\] ; 1038 <__bar5_from_arm\+0x8>
1034: e12fff1c bx ip
1038: 0200302d .word 0x0200302d
1038: 0200302f .word 0x0200302f
0000103c <__bar5_from_arm>:
103c: e59fc000 ldr ip, \[pc, #0\] ; 1044 <__bar5_from_arm\+0x8>
0000103c <__bar4_from_arm>:
103c: e59fc000 ldr ip, \[pc, #0\] ; 1044 <__bar4_from_arm\+0x8>
1040: e12fff1c bx ip
1044: 0200302f .word 0x0200302f
1044: 0200302d .word 0x0200302d
00001048 <__bar3_veneer>:
1048: e51ff004 ldr pc, \[pc, #-4\] ; 104c <__bar3_veneer\+0x4>

View File

@ -4,37 +4,37 @@
Disassembly of section .text:
00001000 <_start>:
1000: eb000009 bl 102c <__bar_from_arm>
1004: eb000006 bl 1024 <__bar2_veneer>
1000: eb00000c bl 1038 <__bar_from_arm>
1004: eb00000e bl 1044 <__bar2_veneer>
00001008 <myfunc>:
1008: eb00000d bl 1044 <__bar3_veneer>
100c: eb000001 bl 1018 <__bar4_from_arm>
1010: eb000008 bl 1038 <__bar5_from_arm>
1008: eb000008 bl 1030 <__bar3_veneer>
100c: eb000004 bl 1024 <__bar4_from_arm>
1010: eb000000 bl 1018 <__bar5_from_arm>
1014: 00000000 andeq r0, r0, r0
00001018 <__bar4_from_arm>:
1018: e59fc000 ldr ip, \[pc, #0\] ; 1020 <__bar4_from_arm\+0x8>
00001018 <__bar5_from_arm>:
1018: e59fc000 ldr ip, \[pc, #0\] ; 1020 <__bar5_from_arm\+0x8>
101c: e12fff1c bx ip
1020: 0200302d .word 0x0200302d
1020: 0200302f .word 0x0200302f
00001024 <__bar2_veneer>:
1024: e51ff004 ldr pc, \[pc, #-4\] ; 1028 <__bar2_veneer\+0x4>
1028: 02003024 .word 0x02003024
00001024 <__bar4_from_arm>:
1024: e59fc000 ldr ip, \[pc, #0\] ; 102c <__bar4_from_arm\+0x8>
1028: e12fff1c bx ip
102c: 0200302d .word 0x0200302d
0000102c <__bar_from_arm>:
102c: e59fc000 ldr ip, \[pc, #0\] ; 1034 <__bar_from_arm\+0x8>
1030: e12fff1c bx ip
1034: 02003021 .word 0x02003021
00001030 <__bar3_veneer>:
1030: e51ff004 ldr pc, \[pc, #-4\] ; 1034 <__bar3_veneer\+0x4>
1034: 02003028 .word 0x02003028
00001038 <__bar5_from_arm>:
1038: e59fc000 ldr ip, \[pc, #0\] ; 1040 <__bar5_from_arm\+0x8>
00001038 <__bar_from_arm>:
1038: e59fc000 ldr ip, \[pc, #0\] ; 1040 <__bar_from_arm\+0x8>
103c: e12fff1c bx ip
1040: 0200302f .word 0x0200302f
1040: 02003021 .word 0x02003021
00001044 <__bar3_veneer>:
1044: e51ff004 ldr pc, \[pc, #-4\] ; 1048 <__bar3_veneer\+0x4>
1048: 02003028 .word 0x02003028
00001044 <__bar2_veneer>:
1044: e51ff004 ldr pc, \[pc, #-4\] ; 1048 <__bar2_veneer\+0x4>
1048: 02003024 .word 0x02003024
...
Disassembly of section .foo:

View File

@ -89,26 +89,26 @@ Disassembly of section .text:
...
.* <__real_lib_func3>:
.*: f000 f806 bl 2000380 <__app_func_from_thumb>
.*: f000 f80c bl 2000390 <__app_func_weak_from_thumb>
.*: f000 f80e bl 2000390 <__app_func_from_thumb>
.*: f000 f804 bl 2000380 <__app_func_weak_from_thumb>
.*: 4770 bx lr
.*: 46c0 nop ; \(mov r8, r8\)
.*: 46c0 nop ; \(mov r8, r8\)
.*: 46c0 nop ; \(mov r8, r8\)
.* <__app_func_from_thumb>:
.*: 4778 bx pc
.*: 46c0 nop ; \(mov r8, r8\)
.*: e59fc000 ldr ip, \[pc, #0\] ; 200038c <__app_func_from_thumb\+0xc>
.*: e08cf00f add pc, ip, pc
.*: fdffff18 .word 0xfdffff18
.* <__app_func_weak_from_thumb>:
.*: 4778 bx pc
.*: 46c0 nop ; \(mov r8, r8\)
.*: e59fc000 ldr ip, \[pc, #0\] ; 200039c <__app_func_weak_from_thumb\+0xc>
.*: e59fc000 ldr ip, \[pc, #0\] ; 200038c <__app_func_weak_from_thumb\+0xc>
.*: e08cf00f add pc, ip, pc
.*: fdffff18 .word 0xfdffff18
.*: fdffff28 .word 0xfdffff28
.* <__app_func_from_thumb>:
.*: 4778 bx pc
.*: 46c0 nop ; \(mov r8, r8\)
.*: e59fc000 ldr ip, \[pc, #0\] ; 200039c <__app_func_from_thumb\+0xc>
.*: e08cf00f add pc, ip, pc
.*: fdffff08 .word 0xfdffff08
.* <lib_func3>:
.*: e59fc004 ldr ip, \[pc, #4\] ; 20003ac <lib_func3\+0xc>

View File

@ -73,20 +73,20 @@ Disassembly of section .text:
...
.* <lib_func3>:
.*: f000 e806 blx 2000370 <__app_func_from_thumb>
.*: f000 e80a blx 200037c <__app_func_weak_from_thumb>
.*: f000 e80c blx 200037c <__app_func_from_thumb>
.*: f000 e804 blx 2000370 <__app_func_weak_from_thumb>
.*: 4770 bx lr
.*: 46c0 nop ; \(mov r8, r8\)
.*: 46c0 nop ; \(mov r8, r8\)
.*: 46c0 nop ; \(mov r8, r8\)
.* <__app_func_from_thumb>:
.*: e59fc000 ldr ip, \[pc, #0\] ; 2000378 <__app_func_from_thumb\+0x8>
.*: e08ff00c add pc, pc, ip
.*: fdffff28 .word 0xfdffff28
.* <__app_func_weak_from_thumb>:
.*: e59fc000 ldr ip, \[pc, #0\] ; 2000384 <__app_func_weak_from_thumb\+0x8>
.*: e59fc000 ldr ip, \[pc, #0\] ; 2000378 <__app_func_weak_from_thumb\+0x8>
.*: e08ff00c add pc, pc, ip
.*: fdffff28 .word 0xfdffff28
.*: fdffff34 .word 0xfdffff34
.* <__app_func_from_thumb>:
.*: e59fc000 ldr ip, \[pc, #0\] ; 2000384 <__app_func_from_thumb\+0x8>
.*: e08ff00c add pc, pc, ip
.*: fdffff1c .word 0xfdffff1c
...

View File

@ -0,0 +1,139 @@
.*
Disassembly of section \.iplt:
00009000 <f3-0xc>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
9000: e28fc600 add ip, pc, #0
9004: e28cca08 add ip, ip, #32768 ; 0x8000
9008: e5bcf004 ldr pc, \[ip, #4\]!
0000900c <f3>:
900c: e28fc600 add ip, pc, #0
9010: e28cca07 add ip, ip, #28672 ; 0x7000
9014: e5bcfffc ldr pc, \[ip, #4092\]! ; 0xffc
00009018 <f2>:
9018: e28fc600 add ip, pc, #0
901c: e28cca07 add ip, ip, #28672 ; 0x7000
9020: e5bcfff4 ldr pc, \[ip, #4084\]! ; 0xff4
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
a004: e1a0f00e mov pc, lr
a008: e1a0f00e mov pc, lr
0000a00c <_start>:
a00c: eb0017fb bl 10000 <foo>
a010: e59f400c ldr r4, \[pc, #12\] ; a024 <_start\+0x18>
a014: e59f400c ldr r4, \[pc, #12\] ; a028 <_start\+0x1c>
a018: e59f400c ldr r4, \[pc, #12\] ; a02c <_start\+0x20>
a01c: e59f400c ldr r4, \[pc, #12\] ; a030 <_start\+0x24>
a020: e59f500c ldr r5, \[pc, #12\] ; a034 <_start\+0x28>
#------------------------------------------------------------------------------
#------ foo
#------------------------------------------------------------------------------
a024: 00010000 \.word 0x00010000
#------------------------------------------------------------------------------
#------ PC-relative offset of foo
#------------------------------------------------------------------------------
a028: 00005fd8 \.word 0x00005fd8
#------------------------------------------------------------------------------
#------ GP-relative offset of foo
#------------------------------------------------------------------------------
a02c: fffff000 \.word 0xfffff000
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a030: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a034: 00006fe4 \.word 0x00006fe4
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a038: ebfffbf0 bl 9000 <__irel_end\+0xfe8>
a03c: e59f400c ldr r4, \[pc, #12\] ; a050 <_start\+0x44>
a040: e59f400c ldr r4, \[pc, #12\] ; a054 <_start\+0x48>
a044: e59f400c ldr r4, \[pc, #12\] ; a058 <_start\+0x4c>
a048: e59f400c ldr r4, \[pc, #12\] ; a05c <_start\+0x50>
a04c: e59f500c ldr r5, \[pc, #12\] ; a060 <_start\+0x54>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a050: 00009000 \.word 0x00009000
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a054: ffffefac \.word 0xffffefac
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a058: ffff8000 \.word 0xffff8000
#------------------------------------------------------------------------------
#------ .got offset for f1's .iplt entry
#------------------------------------------------------------------------------
a05c: 0000001c \.word 0x0000001c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1's .iplt entry
#------------------------------------------------------------------------------
a060: 00006fbc \.word 0x00006fbc
a064: ebfffbeb bl 9018 <f2>
a068: e59f400c ldr r4, \[pc, #12\] ; a07c <_start\+0x70>
a06c: e59f400c ldr r4, \[pc, #12\] ; a080 <_start\+0x74>
a070: e59f400c ldr r4, \[pc, #12\] ; a084 <_start\+0x78>
a074: e59f400c ldr r4, \[pc, #12\] ; a088 <_start\+0x7c>
a078: e59f500c ldr r5, \[pc, #12\] ; a08c <_start\+0x80>
#------------------------------------------------------------------------------
#------ f2
#------------------------------------------------------------------------------
a07c: 00009018 \.word 0x00009018
#------------------------------------------------------------------------------
#------ PC-relative offset of f2
#------------------------------------------------------------------------------
a080: ffffef98 \.word 0xffffef98
#------------------------------------------------------------------------------
#------ GP-relative offset of f2
#------------------------------------------------------------------------------
a084: ffff8018 \.word 0xffff8018
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a088: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a08c: 00006f9c \.word 0x00006f9c
a090: ebfffbdd bl 900c <f3>
a094: e59f400c ldr r4, \[pc, #12\] ; a0a8 <_start\+0x9c>
a098: e59f400c ldr r4, \[pc, #12\] ; a0ac <_start\+0xa0>
a09c: e59f400c ldr r4, \[pc, #12\] ; a0b0 <_start\+0xa4>
a0a0: e59f400c ldr r4, \[pc, #12\] ; a0b4 <_start\+0xa8>
a0a4: e59f500c ldr r5, \[pc, #12\] ; a0b8 <_start\+0xac>
#------------------------------------------------------------------------------
#------ f3
#------------------------------------------------------------------------------
a0a8: 0000900c \.word 0x0000900c
#------------------------------------------------------------------------------
#------ PC-relative offset of f3
#------------------------------------------------------------------------------
a0ac: ffffef60 \.word 0xffffef60
#------------------------------------------------------------------------------
#------ GP-relative offset of f3
#------------------------------------------------------------------------------
a0b0: ffff800c \.word 0xffff800c
#------------------------------------------------------------------------------
#------ .got offset for f3
#------------------------------------------------------------------------------
a0b4: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3
#------------------------------------------------------------------------------
a0b8: 00006f6c \.word 0x00006f6c

View File

@ -0,0 +1,29 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 18800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11000 00000000 00000000 00000000 00a00000 .*
#------------------------------------------------------------------------------
#------ 00011010: f3's .igot.plt pointer to 0xa008 [R_ARM_IRELATIVE]
#------ 00011014: f2's .igot.plt pointer to 0xa004 [R_ARM_IRELATIVE]
#------ 00011018: .got entry for foo
#------ 0001101c: .got entry for f1's .iplt entry
#------------------------------------------------------------------------------
11010 08a00000 04a00000 00000100 00900000 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for foo
#------ 00011024: .got entry for f3
#------ 00011028: .got entry for f2
#------------------------------------------------------------------------------
11020 00000100 0c900000 18900000 .*

View File

@ -0,0 +1,8 @@
There is no dynamic section in this file\.
Relocation section '\.rel\.dyn' at offset 0x8000 contains 3 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE

View File

@ -0,0 +1,48 @@
.macro define,name
.type \name,%gnu_indirect_function
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
bl \name
ldr r4,1f
ldr r4,2f
ldr r4,3f
ldr r4,4f
ldr r5,5f
1:
.word \name
2:
.word \name-.
3:
.word \name(GOTOFF)
4:
.word \name(GOT)
5:
.word \name(GOT_PREL)
.endm
.global f2
.global f3
.hidden f3
define f1
define f2
define f3
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,951 @@
.*
Disassembly of section \.plt:
00009000 <\.plt>:
9000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
9004: e59fe004 ldr lr, \[pc, #4\] ; 9010 <atf3-0x110>
9008: e08fe00e add lr, pc, lr
900c: e5bef008 ldr pc, \[lr, #8\]!
#------------------------------------------------------------------------------
#------ PC-relative offset of .got.plt
#------------------------------------------------------------------------------
9010: 00007ff0 \.word 0x00007ff0
#------------------------------------------------------------------------------
#------ thumb entry to atf2's .plt entry
#------------------------------------------------------------------------------
9014: 4778 bx pc
9016: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ atf2's .plt entry
#------------------------------------------------------------------------------
9018: e28fc600 add ip, pc, #0
901c: e28cca07 add ip, ip, #28672 ; 0x7000
9020: e5bcffec ldr pc, \[ip, #4076\]! ; 0xfec
#------------------------------------------------------------------------------
#------ aaf4's .plt entry
#------------------------------------------------------------------------------
9024: e28fc600 add ip, pc, #0
9028: e28cca07 add ip, ip, #28672 ; 0x7000
902c: e5bcffe4 ldr pc, \[ip, #4068\]! ; 0xfe4
#------------------------------------------------------------------------------
#------ thumb entry to ttf2's .plt entry
#------------------------------------------------------------------------------
9030: 4778 bx pc
9032: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ ttf2's .plt entry
#------------------------------------------------------------------------------
9034: e28fc600 add ip, pc, #0
9038: e28cca07 add ip, ip, #28672 ; 0x7000
903c: e5bcffd8 ldr pc, \[ip, #4056\]! ; 0xfd8
#------------------------------------------------------------------------------
#------ thumb entry to tbf2's .plt entry
#------------------------------------------------------------------------------
9040: 4778 bx pc
9042: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ tbf2's .plt entry
#------------------------------------------------------------------------------
9044: e28fc600 add ip, pc, #0
9048: e28cca07 add ip, ip, #28672 ; 0x7000
904c: e5bcffcc ldr pc, \[ip, #4044\]! ; 0xfcc
#------------------------------------------------------------------------------
#------ taf2's .plt entry
#------------------------------------------------------------------------------
9050: e28fc600 add ip, pc, #0
9054: e28cca07 add ip, ip, #28672 ; 0x7000
9058: e5bcffc4 ldr pc, \[ip, #4036\]! ; 0xfc4
#------------------------------------------------------------------------------
#------ aaf2's .plt entry
#------------------------------------------------------------------------------
905c: e28fc600 add ip, pc, #0
9060: e28cca07 add ip, ip, #28672 ; 0x7000
9064: e5bcffbc ldr pc, \[ip, #4028\]! ; 0xfbc
#------------------------------------------------------------------------------
#------ thumb entry to abf4's .plt entry
#------------------------------------------------------------------------------
9068: 4778 bx pc
906a: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ abf4's .plt entry
#------------------------------------------------------------------------------
906c: e28fc600 add ip, pc, #0
9070: e28cca07 add ip, ip, #28672 ; 0x7000
9074: e5bcffb0 ldr pc, \[ip, #4016\]! ; 0xfb0
#------------------------------------------------------------------------------
#------ thumb entry to tbf4's .plt entry
#------------------------------------------------------------------------------
9078: 4778 bx pc
907a: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ tbf4's .plt entry
#------------------------------------------------------------------------------
907c: e28fc600 add ip, pc, #0
9080: e28cca07 add ip, ip, #28672 ; 0x7000
9084: e5bcffa4 ldr pc, \[ip, #4004\]! ; 0xfa4
#------------------------------------------------------------------------------
#------ thumb entry to ttf4's .plt entry
#------------------------------------------------------------------------------
9088: 4778 bx pc
908a: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ ttf4's .plt entry
#------------------------------------------------------------------------------
908c: e28fc600 add ip, pc, #0
9090: e28cca07 add ip, ip, #28672 ; 0x7000
9094: e5bcff98 ldr pc, \[ip, #3992\]! ; 0xf98
#------------------------------------------------------------------------------
#------ thumb entry to atf4's .plt entry
#------------------------------------------------------------------------------
9098: 4778 bx pc
909a: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ atf4's .plt entry
#------------------------------------------------------------------------------
909c: e28fc600 add ip, pc, #0
90a0: e28cca07 add ip, ip, #28672 ; 0x7000
90a4: e5bcff8c ldr pc, \[ip, #3980\]! ; 0xf8c
#------------------------------------------------------------------------------
#------ taf4's .plt entry
#------------------------------------------------------------------------------
90a8: e28fc600 add ip, pc, #0
90ac: e28cca07 add ip, ip, #28672 ; 0x7000
90b0: e5bcff84 ldr pc, \[ip, #3972\]! ; 0xf84
#------------------------------------------------------------------------------
#------ thumb entry to abf2's .plt entry
#------------------------------------------------------------------------------
90b4: 4778 bx pc
90b6: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ abf2's .plt entry
#------------------------------------------------------------------------------
90b8: e28fc600 add ip, pc, #0
90bc: e28cca07 add ip, ip, #28672 ; 0x7000
90c0: e5bcff78 ldr pc, \[ip, #3960\]! ; 0xf78
Disassembly of section \.iplt:
000090c4 <atf3-0x5c>:
#------------------------------------------------------------------------------
#------ aaf1's .iplt entry
#------------------------------------------------------------------------------
90c4: e28fc600 add ip, pc, #0
90c8: e28cca07 add ip, ip, #28672 ; 0x7000
90cc: e5bcff70 ldr pc, \[ip, #3952\]! ; 0xf70
#------------------------------------------------------------------------------
#------ thumb entry to atf1's .iplt entry
#------------------------------------------------------------------------------
90d0: 4778 bx pc
90d2: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ atf1's .iplt entry
#------------------------------------------------------------------------------
90d4: e28fc600 add ip, pc, #0
90d8: e28cca07 add ip, ip, #28672 ; 0x7000
90dc: e5bcff64 ldr pc, \[ip, #3940\]! ; 0xf64
#------------------------------------------------------------------------------
#------ thumb entry to abf1's .iplt entry
#------------------------------------------------------------------------------
90e0: 4778 bx pc
90e2: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ abf1's .iplt entry
#------------------------------------------------------------------------------
90e4: e28fc600 add ip, pc, #0
90e8: e28cca07 add ip, ip, #28672 ; 0x7000
90ec: e5bcff58 ldr pc, \[ip, #3928\]! ; 0xf58
#------------------------------------------------------------------------------
#------ taf1's .iplt entry
#------------------------------------------------------------------------------
90f0: e28fc600 add ip, pc, #0
90f4: e28cca07 add ip, ip, #28672 ; 0x7000
90f8: e5bcff50 ldr pc, \[ip, #3920\]! ; 0xf50
#------------------------------------------------------------------------------
#------ thumb entry to ttf1's .iplt entry
#------------------------------------------------------------------------------
90fc: 4778 bx pc
90fe: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ ttf1's .iplt entry
#------------------------------------------------------------------------------
9100: e28fc600 add ip, pc, #0
9104: e28cca07 add ip, ip, #28672 ; 0x7000
9108: e5bcff44 ldr pc, \[ip, #3908\]! ; 0xf44
#------------------------------------------------------------------------------
#------ thumb entry to tbf1's .iplt entry
#------------------------------------------------------------------------------
910c: 4778 bx pc
910e: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ tbf1's .iplt entry
#------------------------------------------------------------------------------
9110: e28fc600 add ip, pc, #0
9114: e28cca07 add ip, ip, #28672 ; 0x7000
9118: e5bcff38 ldr pc, \[ip, #3896\]! ; 0xf38
#------------------------------------------------------------------------------
#------ thumb entry to atf3
#------------------------------------------------------------------------------
911c: 4778 bx pc
911e: 46c0 nop ; \(mov r8, r8\)
00009120 <atf3>:
9120: e28fc600 add ip, pc, #0
9124: e28cca07 add ip, ip, #28672 ; 0x7000
9128: e5bcff2c ldr pc, \[ip, #3884\]! ; 0xf2c
#------------------------------------------------------------------------------
#------ thumb entry to abf3
#------------------------------------------------------------------------------
912c: 4778 bx pc
912e: 46c0 nop ; \(mov r8, r8\)
00009130 <abf3>:
9130: e28fc600 add ip, pc, #0
9134: e28cca07 add ip, ip, #28672 ; 0x7000
9138: e5bcff20 ldr pc, \[ip, #3872\]! ; 0xf20
#------------------------------------------------------------------------------
#------ thumb entry to ttf3
#------------------------------------------------------------------------------
913c: 4778 bx pc
913e: 46c0 nop ; \(mov r8, r8\)
00009140 <ttf3>:
9140: e28fc600 add ip, pc, #0
9144: e28cca07 add ip, ip, #28672 ; 0x7000
9148: e5bcff14 ldr pc, \[ip, #3860\]! ; 0xf14
#------------------------------------------------------------------------------
#------ thumb entry to tbf3
#------------------------------------------------------------------------------
914c: 4778 bx pc
914e: 46c0 nop ; \(mov r8, r8\)
00009150 <tbf3>:
9150: e28fc600 add ip, pc, #0
9154: e28cca07 add ip, ip, #28672 ; 0x7000
9158: e5bcff08 ldr pc, \[ip, #3848\]! ; 0xf08
0000915c <taf3>:
915c: e28fc600 add ip, pc, #0
9160: e28cca07 add ip, ip, #28672 ; 0x7000
9164: e5bcff00 ldr pc, \[ip, #3840\]! ; 0xf00
00009168 <aaf3>:
9168: e28fc600 add ip, pc, #0
916c: e28cca07 add ip, ip, #28672 ; 0x7000
9170: e5bcfef8 ldr pc, \[ip, #3832\]! ; 0xef8
Disassembly of section \.text:
0000a000 <aaf1>:
a000: e1a0f00e mov pc, lr
0000a004 <atf1>:
a004: e1a0f00e mov pc, lr
0000a008 <abf1>:
a008: e1a0f00e mov pc, lr
0000a00c <taf1>:
a00c: 46f7 mov pc, lr
0000a00e <ttf1>:
a00e: 46f7 mov pc, lr
0000a010 <tbf1>:
a010: 46f7 mov pc, lr
a012: 0000 movs r0, r0
a014: e1a0f00e mov pc, lr
a018: e1a0f00e mov pc, lr
a01c: e1a0f00e mov pc, lr
a020: 46f7 mov pc, lr
a022: 46f7 mov pc, lr
a024: 46f7 mov pc, lr
\.\.\.
0000a028 <_start>:
a028: eb0017f4 bl 10000 <foo>
a02c: ea0017f3 b 10000 <foo>
a030: 0a0017f2 beq 10000 <foo>
a034: e59f4000 ldr r4, \[pc, #0\] ; a03c <_start\+0x14>
a038: e59f4000 ldr r4, \[pc, #0\] ; a040 <_start\+0x18>
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a03c: 00000088 \.word 0x00000088
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a040: 0000702c \.word 0x0000702c
#------------------------------------------------------------------------------
#------ aaf1's .iplt entry
#------------------------------------------------------------------------------
a044: ebfffc1e bl 90c4 <atf3-0x5c>
#------------------------------------------------------------------------------
#------ aaf1's .iplt entry
#------------------------------------------------------------------------------
a048: eafffc1d b 90c4 <atf3-0x5c>
#------------------------------------------------------------------------------
#------ aaf1's .iplt entry
#------------------------------------------------------------------------------
a04c: 0afffc1c beq 90c4 <atf3-0x5c>
a050: e59f4000 ldr r4, \[pc, #0\] ; a058 <_start\+0x30>
a054: e59f4000 ldr r4, \[pc, #0\] ; a05c <_start\+0x34>
#------------------------------------------------------------------------------
#------ .got offset for aaf1's .iplt entry
#------------------------------------------------------------------------------
a058: 00000070 \.word 0x00000070
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for aaf1's .iplt entry
#------------------------------------------------------------------------------
a05c: 00007014 \.word 0x00007014
#------------------------------------------------------------------------------
#------ taf1's .iplt entry
#------------------------------------------------------------------------------
a060: ebfffc22 bl 90f0 <atf3-0x30>
#------------------------------------------------------------------------------
#------ taf1's .iplt entry
#------------------------------------------------------------------------------
a064: eafffc21 b 90f0 <atf3-0x30>
#------------------------------------------------------------------------------
#------ taf1's .iplt entry
#------------------------------------------------------------------------------
a068: 0afffc20 beq 90f0 <atf3-0x30>
a06c: e59f4000 ldr r4, \[pc, #0\] ; a074 <_start\+0x4c>
a070: e59f4000 ldr r4, \[pc, #0\] ; a078 <_start\+0x50>
#------------------------------------------------------------------------------
#------ .got offset for taf1's .iplt entry
#------------------------------------------------------------------------------
a074: 0000007c \.word 0x0000007c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for taf1's .iplt entry
#------------------------------------------------------------------------------
a078: 00007004 \.word 0x00007004
#------------------------------------------------------------------------------
#------ abf1's .iplt entry
#------------------------------------------------------------------------------
a07c: ebfffc18 bl 90e4 <atf3-0x3c>
#------------------------------------------------------------------------------
#------ abf1's .iplt entry
#------------------------------------------------------------------------------
a080: eafffc17 b 90e4 <atf3-0x3c>
#------------------------------------------------------------------------------
#------ abf1's .iplt entry
#------------------------------------------------------------------------------
a084: 0afffc16 beq 90e4 <atf3-0x3c>
a088: e59f4000 ldr r4, \[pc, #0\] ; a090 <_start\+0x68>
a08c: e59f4000 ldr r4, \[pc, #0\] ; a094 <_start\+0x6c>
#------------------------------------------------------------------------------
#------ .got offset for abf1's .iplt entry
#------------------------------------------------------------------------------
a090: 00000078 \.word 0x00000078
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf1's .iplt entry
#------------------------------------------------------------------------------
a094: 00006fe4 \.word 0x00006fe4
#------------------------------------------------------------------------------
#------ tbf1's .iplt entry
#------------------------------------------------------------------------------
a098: ebfffc1c bl 9110 <atf3-0x10>
#------------------------------------------------------------------------------
#------ tbf1's .iplt entry
#------------------------------------------------------------------------------
a09c: eafffc1b b 9110 <atf3-0x10>
#------------------------------------------------------------------------------
#------ tbf1's .iplt entry
#------------------------------------------------------------------------------
a0a0: 0afffc1a beq 9110 <atf3-0x10>
a0a4: e59f4000 ldr r4, \[pc, #0\] ; a0ac <_start\+0x84>
a0a8: e59f4000 ldr r4, \[pc, #0\] ; a0b0 <_start\+0x88>
#------------------------------------------------------------------------------
#------ .got offset for tbf1's .iplt entry
#------------------------------------------------------------------------------
a0ac: 00000084 \.word 0x00000084
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf1's .iplt entry
#------------------------------------------------------------------------------
a0b0: 00006fd4 \.word 0x00006fd4
#------------------------------------------------------------------------------
#------ aaf2's .plt entry
#------------------------------------------------------------------------------
a0b4: ebfffbe8 bl 905c <atf3-0xc4>
#------------------------------------------------------------------------------
#------ aaf2's .plt entry
#------------------------------------------------------------------------------
a0b8: eafffbe7 b 905c <atf3-0xc4>
#------------------------------------------------------------------------------
#------ aaf2's .plt entry
#------------------------------------------------------------------------------
a0bc: 0afffbe6 beq 905c <atf3-0xc4>
a0c0: e59f4000 ldr r4, \[pc, #0\] ; a0c8 <_start\+0xa0>
a0c4: e59f4000 ldr r4, \[pc, #0\] ; a0cc <_start\+0xa4>
#------------------------------------------------------------------------------
#------ .got offset for aaf2
#------------------------------------------------------------------------------
a0c8: 000000a8 \.word 0x000000a8
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for aaf2
#------------------------------------------------------------------------------
a0cc: 00006fdc \.word 0x00006fdc
#------------------------------------------------------------------------------
#------ taf2's .plt entry
#------------------------------------------------------------------------------
a0d0: ebfffbde bl 9050 <atf3-0xd0>
#------------------------------------------------------------------------------
#------ taf2's .plt entry
#------------------------------------------------------------------------------
a0d4: eafffbdd b 9050 <atf3-0xd0>
#------------------------------------------------------------------------------
#------ taf2's .plt entry
#------------------------------------------------------------------------------
a0d8: 0afffbdc beq 9050 <atf3-0xd0>
a0dc: e59f4000 ldr r4, \[pc, #0\] ; a0e4 <_start\+0xbc>
a0e0: e59f4000 ldr r4, \[pc, #0\] ; a0e8 <_start\+0xc0>
#------------------------------------------------------------------------------
#------ .got offset for taf2
#------------------------------------------------------------------------------
a0e4: 000000a4 \.word 0x000000a4
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for taf2
#------------------------------------------------------------------------------
a0e8: 00006fbc \.word 0x00006fbc
#------------------------------------------------------------------------------
#------ abf2's .plt entry
#------------------------------------------------------------------------------
a0ec: ebfffbf1 bl 90b8 <atf3-0x68>
#------------------------------------------------------------------------------
#------ abf2's .plt entry
#------------------------------------------------------------------------------
a0f0: eafffbf0 b 90b8 <atf3-0x68>
#------------------------------------------------------------------------------
#------ abf2's .plt entry
#------------------------------------------------------------------------------
a0f4: 0afffbef beq 90b8 <atf3-0x68>
a0f8: e59f4000 ldr r4, \[pc, #0\] ; a100 <_start\+0xd8>
a0fc: e59f4000 ldr r4, \[pc, #0\] ; a104 <_start\+0xdc>
#------------------------------------------------------------------------------
#------ .got offset for abf2
#------------------------------------------------------------------------------
a100: 000000d0 \.word 0x000000d0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf2
#------------------------------------------------------------------------------
a104: 00006fcc \.word 0x00006fcc
#------------------------------------------------------------------------------
#------ tbf2's .plt entry
#------------------------------------------------------------------------------
a108: ebfffbcd bl 9044 <atf3-0xdc>
#------------------------------------------------------------------------------
#------ tbf2's .plt entry
#------------------------------------------------------------------------------
a10c: eafffbcc b 9044 <atf3-0xdc>
#------------------------------------------------------------------------------
#------ tbf2's .plt entry
#------------------------------------------------------------------------------
a110: 0afffbcb beq 9044 <atf3-0xdc>
a114: e59f4000 ldr r4, \[pc, #0\] ; a11c <_start\+0xf4>
a118: e59f4000 ldr r4, \[pc, #0\] ; a120 <_start\+0xf8>
#------------------------------------------------------------------------------
#------ .got offset for tbf2
#------------------------------------------------------------------------------
a11c: 00000098 \.word 0x00000098
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf2
#------------------------------------------------------------------------------
a120: 00006f78 \.word 0x00006f78
a124: ebfffc0f bl 9168 <aaf3>
a128: eafffc0e b 9168 <aaf3>
a12c: 0afffc0d beq 9168 <aaf3>
a130: e59f4000 ldr r4, \[pc, #0\] ; a138 <_start\+0x110>
a134: e59f4000 ldr r4, \[pc, #0\] ; a13c <_start\+0x114>
#------------------------------------------------------------------------------
#------ .got offset for aaf3
#------------------------------------------------------------------------------
a138: 000000c4 \.word 0x000000c4
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for aaf3
#------------------------------------------------------------------------------
a13c: 00006f88 \.word 0x00006f88
a140: ebfffc05 bl 915c <taf3>
a144: eafffc04 b 915c <taf3>
a148: 0afffc03 beq 915c <taf3>
a14c: e59f4000 ldr r4, \[pc, #0\] ; a154 <_start\+0x12c>
a150: e59f4000 ldr r4, \[pc, #0\] ; a158 <_start\+0x130>
#------------------------------------------------------------------------------
#------ .got offset for taf3
#------------------------------------------------------------------------------
a154: 000000b4 \.word 0x000000b4
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for taf3
#------------------------------------------------------------------------------
a158: 00006f5c \.word 0x00006f5c
a15c: ebfffbf3 bl 9130 <abf3>
a160: eafffbf2 b 9130 <abf3>
a164: 0afffbf1 beq 9130 <abf3>
a168: e59f4000 ldr r4, \[pc, #0\] ; a170 <_start\+0x148>
a16c: e59f4000 ldr r4, \[pc, #0\] ; a174 <_start\+0x14c>
#------------------------------------------------------------------------------
#------ .got offset for abf3
#------------------------------------------------------------------------------
a170: 000000a0 \.word 0x000000a0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf3
#------------------------------------------------------------------------------
a174: 00006f2c \.word 0x00006f2c
a178: ebfffbf4 bl 9150 <tbf3>
a17c: eafffbf3 b 9150 <tbf3>
a180: 0afffbf2 beq 9150 <tbf3>
a184: e59f4000 ldr r4, \[pc, #0\] ; a18c <_start\+0x164>
a188: e59f4000 ldr r4, \[pc, #0\] ; a190 <_start\+0x168>
#------------------------------------------------------------------------------
#------ .got offset for tbf3
#------------------------------------------------------------------------------
a18c: 000000b0 \.word 0x000000b0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf3
#------------------------------------------------------------------------------
a190: 00006f20 \.word 0x00006f20
#------------------------------------------------------------------------------
#------ aaf4's .plt entry
#------------------------------------------------------------------------------
a194: ebfffba2 bl 9024 <atf3-0xfc>
#------------------------------------------------------------------------------
#------ aaf4's .plt entry
#------------------------------------------------------------------------------
a198: eafffba1 b 9024 <atf3-0xfc>
#------------------------------------------------------------------------------
#------ aaf4's .plt entry
#------------------------------------------------------------------------------
a19c: 0afffba0 beq 9024 <atf3-0xfc>
a1a0: e59f4000 ldr r4, \[pc, #0\] ; a1a8 <_start\+0x180>
a1a4: e59f4000 ldr r4, \[pc, #0\] ; a1ac <_start\+0x184>
#------------------------------------------------------------------------------
#------ .got offset for aaf4
#------------------------------------------------------------------------------
a1a8: 00000090 \.word 0x00000090
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for aaf4
#------------------------------------------------------------------------------
a1ac: 00006ee4 \.word 0x00006ee4
#------------------------------------------------------------------------------
#------ taf4's .plt entry
#------------------------------------------------------------------------------
a1b0: ebfffbbc bl 90a8 <atf3-0x78>
#------------------------------------------------------------------------------
#------ taf4's .plt entry
#------------------------------------------------------------------------------
a1b4: eafffbbb b 90a8 <atf3-0x78>
#------------------------------------------------------------------------------
#------ taf4's .plt entry
#------------------------------------------------------------------------------
a1b8: 0afffbba beq 90a8 <atf3-0x78>
a1bc: e59f4000 ldr r4, \[pc, #0\] ; a1c4 <_start\+0x19c>
a1c0: e59f4000 ldr r4, \[pc, #0\] ; a1c8 <_start\+0x1a0>
#------------------------------------------------------------------------------
#------ .got offset for taf4
#------------------------------------------------------------------------------
a1c4: 000000cc \.word 0x000000cc
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for taf4
#------------------------------------------------------------------------------
a1c8: 00006f04 \.word 0x00006f04
#------------------------------------------------------------------------------
#------ abf4's .plt entry
#------------------------------------------------------------------------------
a1cc: ebfffba6 bl 906c <atf3-0xb4>
#------------------------------------------------------------------------------
#------ abf4's .plt entry
#------------------------------------------------------------------------------
a1d0: eafffba5 b 906c <atf3-0xb4>
#------------------------------------------------------------------------------
#------ abf4's .plt entry
#------------------------------------------------------------------------------
a1d4: 0afffba4 beq 906c <atf3-0xb4>
a1d8: e59f4000 ldr r4, \[pc, #0\] ; a1e0 <_start\+0x1b8>
a1dc: e59f4000 ldr r4, \[pc, #0\] ; a1e4 <_start\+0x1bc>
#------------------------------------------------------------------------------
#------ .got offset for abf4
#------------------------------------------------------------------------------
a1e0: 000000b8 \.word 0x000000b8
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf4
#------------------------------------------------------------------------------
a1e4: 00006ed4 \.word 0x00006ed4
#------------------------------------------------------------------------------
#------ tbf4's .plt entry
#------------------------------------------------------------------------------
a1e8: ebfffba3 bl 907c <atf3-0xa4>
#------------------------------------------------------------------------------
#------ tbf4's .plt entry
#------------------------------------------------------------------------------
a1ec: eafffba2 b 907c <atf3-0xa4>
#------------------------------------------------------------------------------
#------ tbf4's .plt entry
#------------------------------------------------------------------------------
a1f0: 0afffba1 beq 907c <atf3-0xa4>
a1f4: e59f4000 ldr r4, \[pc, #0\] ; a1fc <_start\+0x1d4>
a1f8: e59f4000 ldr r4, \[pc, #0\] ; a200 <_start\+0x1d8>
#------------------------------------------------------------------------------
#------ .got offset for tbf4
#------------------------------------------------------------------------------
a1fc: 000000bc \.word 0x000000bc
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf4
#------------------------------------------------------------------------------
a200: 00006ebc \.word 0x00006ebc
0000a204 <_thumb>:
a204: f005 fefc bl 10000 <foo>
a208: f005 befa b\.w 10000 <foo>
a20c: f005 86f8 beq\.w 10000 <foo>
a210: 4c00 ldr r4, \[pc, #0\] ; \(a214 <_thumb\+0x10>\)
a212: 4c01 ldr r4, \[pc, #4\] ; \(a218 <_thumb\+0x14>\)
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a214: 00000088 \.word 0x00000088
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a218: 00006e54 \.word 0x00006e54
#------------------------------------------------------------------------------
#------ atf1's .iplt entry
#------------------------------------------------------------------------------
a21c: f7fe ef5a blx 90d4 <atf3-0x4c>
#------------------------------------------------------------------------------
#------ thumb entry to atf1's .iplt entry
#------------------------------------------------------------------------------
a220: f7fe bf56 b\.w 90d0 <atf3-0x50>
#------------------------------------------------------------------------------
#------ thumb entry to atf1's .iplt entry
#------------------------------------------------------------------------------
a224: f43e af54 beq\.w 90d0 <atf3-0x50>
a228: 4c00 ldr r4, \[pc, #0\] ; \(a22c <_thumb\+0x28>\)
a22a: 4c01 ldr r4, \[pc, #4\] ; \(a230 <_thumb\+0x2c>\)
#------------------------------------------------------------------------------
#------ .got offset for atf1's .iplt entry
#------------------------------------------------------------------------------
a22c: 00000074 \.word 0x00000074
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for atf1's .iplt entry
#------------------------------------------------------------------------------
a230: 00006e44 \.word 0x00006e44
#------------------------------------------------------------------------------
#------ ttf1's .iplt entry
#------------------------------------------------------------------------------
a234: f7fe ef64 blx 9100 <atf3-0x20>
#------------------------------------------------------------------------------
#------ thumb entry to ttf1's .iplt entry
#------------------------------------------------------------------------------
a238: f7fe bf60 b\.w 90fc <atf3-0x24>
#------------------------------------------------------------------------------
#------ thumb entry to ttf1's .iplt entry
#------------------------------------------------------------------------------
a23c: f43e af5e beq\.w 90fc <atf3-0x24>
a240: 4c00 ldr r4, \[pc, #0\] ; \(a244 <_thumb\+0x40>\)
a242: 4c01 ldr r4, \[pc, #4\] ; \(a248 <_thumb\+0x44>\)
#------------------------------------------------------------------------------
#------ .got offset for ttf1's .iplt entry
#------------------------------------------------------------------------------
a244: 00000080 \.word 0x00000080
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for ttf1's .iplt entry
#------------------------------------------------------------------------------
a248: 00006e38 \.word 0x00006e38
#------------------------------------------------------------------------------
#------ abf1's .iplt entry
#------------------------------------------------------------------------------
a24c: f7fe ef4a blx 90e4 <atf3-0x3c>
#------------------------------------------------------------------------------
#------ thumb entry to abf1's .iplt entry
#------------------------------------------------------------------------------
a250: f7fe bf46 b\.w 90e0 <atf3-0x40>
#------------------------------------------------------------------------------
#------ thumb entry to abf1's .iplt entry
#------------------------------------------------------------------------------
a254: f43e af44 beq\.w 90e0 <atf3-0x40>
a258: 4c00 ldr r4, \[pc, #0\] ; \(a25c <_thumb\+0x58>\)
a25a: 4c01 ldr r4, \[pc, #4\] ; \(a260 <_thumb\+0x5c>\)
#------------------------------------------------------------------------------
#------ .got offset for abf1's .iplt entry
#------------------------------------------------------------------------------
a25c: 00000078 \.word 0x00000078
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf1's .iplt entry
#------------------------------------------------------------------------------
a260: 00006e18 \.word 0x00006e18
#------------------------------------------------------------------------------
#------ tbf1's .iplt entry
#------------------------------------------------------------------------------
a264: f7fe ef54 blx 9110 <atf3-0x10>
#------------------------------------------------------------------------------
#------ thumb entry to tbf1's .iplt entry
#------------------------------------------------------------------------------
a268: f7fe bf50 b\.w 910c <atf3-0x14>
#------------------------------------------------------------------------------
#------ thumb entry to tbf1's .iplt entry
#------------------------------------------------------------------------------
a26c: f43e af4e beq\.w 910c <atf3-0x14>
a270: 4c00 ldr r4, \[pc, #0\] ; \(a274 <_thumb\+0x70>\)
a272: 4c01 ldr r4, \[pc, #4\] ; \(a278 <_thumb\+0x74>\)
#------------------------------------------------------------------------------
#------ .got offset for tbf1's .iplt entry
#------------------------------------------------------------------------------
a274: 00000084 \.word 0x00000084
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf1's .iplt entry
#------------------------------------------------------------------------------
a278: 00006e0c \.word 0x00006e0c
#------------------------------------------------------------------------------
#------ atf2's .plt entry
#------------------------------------------------------------------------------
a27c: f7fe eecc blx 9018 <atf3-0x108>
#------------------------------------------------------------------------------
#------ thumb entry to atf2's .plt entry
#------------------------------------------------------------------------------
a280: f7fe bec8 b\.w 9014 <atf3-0x10c>
#------------------------------------------------------------------------------
#------ thumb entry to atf2's .plt entry
#------------------------------------------------------------------------------
a284: f43e aec6 beq\.w 9014 <atf3-0x10c>
a288: 4c00 ldr r4, \[pc, #0\] ; \(a28c <_thumb\+0x88>\)
a28a: 4c01 ldr r4, \[pc, #4\] ; \(a290 <_thumb\+0x8c>\)
#------------------------------------------------------------------------------
#------ .got offset for atf2
#------------------------------------------------------------------------------
a28c: 0000008c \.word 0x0000008c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for atf2
#------------------------------------------------------------------------------
a290: 00006dfc \.word 0x00006dfc
#------------------------------------------------------------------------------
#------ ttf2's .plt entry
#------------------------------------------------------------------------------
a294: f7fe eece blx 9034 <atf3-0xec>
#------------------------------------------------------------------------------
#------ thumb entry to ttf2's .plt entry
#------------------------------------------------------------------------------
a298: f7fe beca b\.w 9030 <atf3-0xf0>
#------------------------------------------------------------------------------
#------ thumb entry to ttf2's .plt entry
#------------------------------------------------------------------------------
a29c: f43e aec8 beq\.w 9030 <atf3-0xf0>
a2a0: 4c00 ldr r4, \[pc, #0\] ; \(a2a4 <_thumb\+0xa0>\)
a2a2: 4c01 ldr r4, \[pc, #4\] ; \(a2a8 <_thumb\+0xa4>\)
#------------------------------------------------------------------------------
#------ .got offset for ttf2
#------------------------------------------------------------------------------
a2a4: 00000094 \.word 0x00000094
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for ttf2
#------------------------------------------------------------------------------
a2a8: 00006dec \.word 0x00006dec
#------------------------------------------------------------------------------
#------ abf2's .plt entry
#------------------------------------------------------------------------------
a2ac: f7fe ef04 blx 90b8 <atf3-0x68>
#------------------------------------------------------------------------------
#------ thumb entry to abf2's .plt entry
#------------------------------------------------------------------------------
a2b0: f7fe bf00 b\.w 90b4 <atf3-0x6c>
#------------------------------------------------------------------------------
#------ thumb entry to abf2's .plt entry
#------------------------------------------------------------------------------
a2b4: f43e aefe beq\.w 90b4 <atf3-0x6c>
a2b8: 4c00 ldr r4, \[pc, #0\] ; \(a2bc <_thumb\+0xb8>\)
a2ba: 4c01 ldr r4, \[pc, #4\] ; \(a2c0 <_thumb\+0xbc>\)
#------------------------------------------------------------------------------
#------ .got offset for abf2
#------------------------------------------------------------------------------
a2bc: 000000d0 \.word 0x000000d0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf2
#------------------------------------------------------------------------------
a2c0: 00006e10 \.word 0x00006e10
#------------------------------------------------------------------------------
#------ tbf2's .plt entry
#------------------------------------------------------------------------------
a2c4: f7fe eebe blx 9044 <atf3-0xdc>
#------------------------------------------------------------------------------
#------ thumb entry to tbf2's .plt entry
#------------------------------------------------------------------------------
a2c8: f7fe beba b\.w 9040 <atf3-0xe0>
#------------------------------------------------------------------------------
#------ thumb entry to tbf2's .plt entry
#------------------------------------------------------------------------------
a2cc: f43e aeb8 beq\.w 9040 <atf3-0xe0>
a2d0: 4c00 ldr r4, \[pc, #0\] ; \(a2d4 <_thumb\+0xd0>\)
a2d2: 4c01 ldr r4, \[pc, #4\] ; \(a2d8 <_thumb\+0xd4>\)
#------------------------------------------------------------------------------
#------ .got offset for tbf2
#------------------------------------------------------------------------------
a2d4: 00000098 \.word 0x00000098
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf2
#------------------------------------------------------------------------------
a2d8: 00006dc0 \.word 0x00006dc0
a2dc: f7fe ef20 blx 9120 <atf3>
#------------------------------------------------------------------------------
#------ thumb entry to atf3
#------------------------------------------------------------------------------
a2e0: f7fe bf1c b\.w 911c <atf3-0x4>
#------------------------------------------------------------------------------
#------ thumb entry to atf3
#------------------------------------------------------------------------------
a2e4: f43e af1a beq\.w 911c <atf3-0x4>
a2e8: 4c00 ldr r4, \[pc, #0\] ; \(a2ec <_thumb\+0xe8>\)
a2ea: 4c01 ldr r4, \[pc, #4\] ; \(a2f0 <_thumb\+0xec>\)
#------------------------------------------------------------------------------
#------ .got offset for atf3
#------------------------------------------------------------------------------
a2ec: 0000009c \.word 0x0000009c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for atf3
#------------------------------------------------------------------------------
a2f0: 00006dac \.word 0x00006dac
a2f4: f7fe ef24 blx 9140 <ttf3>
#------------------------------------------------------------------------------
#------ thumb entry to ttf3
#------------------------------------------------------------------------------
a2f8: f7fe bf20 b\.w 913c <abf3\+0xc>
#------------------------------------------------------------------------------
#------ thumb entry to ttf3
#------------------------------------------------------------------------------
a2fc: f43e af1e beq\.w 913c <abf3\+0xc>
a300: 4c00 ldr r4, \[pc, #0\] ; \(a304 <_thumb\+0x100>\)
a302: 4c01 ldr r4, \[pc, #4\] ; \(a308 <_thumb\+0x104>\)
#------------------------------------------------------------------------------
#------ .got offset for ttf3
#------------------------------------------------------------------------------
a304: 000000ac \.word 0x000000ac
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for ttf3
#------------------------------------------------------------------------------
a308: 00006da4 \.word 0x00006da4
a30c: f7fe ef10 blx 9130 <abf3>
#------------------------------------------------------------------------------
#------ thumb entry to abf3
#------------------------------------------------------------------------------
a310: f7fe bf0c b\.w 912c <atf3\+0xc>
#------------------------------------------------------------------------------
#------ thumb entry to abf3
#------------------------------------------------------------------------------
a314: f43e af0a beq\.w 912c <atf3\+0xc>
a318: 4c00 ldr r4, \[pc, #0\] ; \(a31c <_thumb\+0x118>\)
a31a: 4c01 ldr r4, \[pc, #4\] ; \(a320 <_thumb\+0x11c>\)
#------------------------------------------------------------------------------
#------ .got offset for abf3
#------------------------------------------------------------------------------
a31c: 000000a0 \.word 0x000000a0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf3
#------------------------------------------------------------------------------
a320: 00006d80 \.word 0x00006d80
a324: f7fe ef14 blx 9150 <tbf3>
#------------------------------------------------------------------------------
#------ thumb entry to tbf3
#------------------------------------------------------------------------------
a328: f7fe bf10 b\.w 914c <ttf3\+0xc>
#------------------------------------------------------------------------------
#------ thumb entry to tbf3
#------------------------------------------------------------------------------
a32c: f43e af0e beq\.w 914c <ttf3\+0xc>
a330: 4c00 ldr r4, \[pc, #0\] ; \(a334 <_thumb\+0x130>\)
a332: 4c01 ldr r4, \[pc, #4\] ; \(a338 <_thumb\+0x134>\)
#------------------------------------------------------------------------------
#------ .got offset for tbf3
#------------------------------------------------------------------------------
a334: 000000b0 \.word 0x000000b0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf3
#------------------------------------------------------------------------------
a338: 00006d78 \.word 0x00006d78
#------------------------------------------------------------------------------
#------ atf4's .plt entry
#------------------------------------------------------------------------------
a33c: f7fe eeae blx 909c <atf3-0x84>
#------------------------------------------------------------------------------
#------ thumb entry to atf4's .plt entry
#------------------------------------------------------------------------------
a340: f7fe beaa b\.w 9098 <atf3-0x88>
#------------------------------------------------------------------------------
#------ thumb entry to atf4's .plt entry
#------------------------------------------------------------------------------
a344: f43e aea8 beq\.w 9098 <atf3-0x88>
a348: 4c00 ldr r4, \[pc, #0\] ; \(a34c <_thumb\+0x148>\)
a34a: 4c01 ldr r4, \[pc, #4\] ; \(a350 <_thumb\+0x14c>\)
#------------------------------------------------------------------------------
#------ .got offset for atf4
#------------------------------------------------------------------------------
a34c: 000000c8 \.word 0x000000c8
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for atf4
#------------------------------------------------------------------------------
a350: 00006d78 \.word 0x00006d78
#------------------------------------------------------------------------------
#------ ttf4's .plt entry
#------------------------------------------------------------------------------
a354: f7fe ee9a blx 908c <atf3-0x94>
#------------------------------------------------------------------------------
#------ thumb entry to ttf4's .plt entry
#------------------------------------------------------------------------------
a358: f7fe be96 b\.w 9088 <atf3-0x98>
#------------------------------------------------------------------------------
#------ thumb entry to ttf4's .plt entry
#------------------------------------------------------------------------------
a35c: f43e ae94 beq\.w 9088 <atf3-0x98>
a360: 4c00 ldr r4, \[pc, #0\] ; \(a364 <_thumb\+0x160>\)
a362: 4c01 ldr r4, \[pc, #4\] ; \(a368 <_thumb\+0x164>\)
#------------------------------------------------------------------------------
#------ .got offset for ttf4
#------------------------------------------------------------------------------
a364: 000000c0 \.word 0x000000c0
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for ttf4
#------------------------------------------------------------------------------
a368: 00006d58 \.word 0x00006d58
#------------------------------------------------------------------------------
#------ abf4's .plt entry
#------------------------------------------------------------------------------
a36c: f7fe ee7e blx 906c <atf3-0xb4>
#------------------------------------------------------------------------------
#------ thumb entry to abf4's .plt entry
#------------------------------------------------------------------------------
a370: f7fe be7a b\.w 9068 <atf3-0xb8>
#------------------------------------------------------------------------------
#------ thumb entry to abf4's .plt entry
#------------------------------------------------------------------------------
a374: f43e ae78 beq\.w 9068 <atf3-0xb8>
a378: 4c00 ldr r4, \[pc, #0\] ; \(a37c <_thumb\+0x178>\)
a37a: 4c01 ldr r4, \[pc, #4\] ; \(a380 <_thumb\+0x17c>\)
#------------------------------------------------------------------------------
#------ .got offset for abf4
#------------------------------------------------------------------------------
a37c: 000000b8 \.word 0x000000b8
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for abf4
#------------------------------------------------------------------------------
a380: 00006d38 \.word 0x00006d38
#------------------------------------------------------------------------------
#------ tbf4's .plt entry
#------------------------------------------------------------------------------
a384: f7fe ee7a blx 907c <atf3-0xa4>
#------------------------------------------------------------------------------
#------ thumb entry to tbf4's .plt entry
#------------------------------------------------------------------------------
a388: f7fe be76 b\.w 9078 <atf3-0xa8>
#------------------------------------------------------------------------------
#------ thumb entry to tbf4's .plt entry
#------------------------------------------------------------------------------
a38c: f43e ae74 beq\.w 9078 <atf3-0xa8>
a390: 4c00 ldr r4, \[pc, #0\] ; \(a394 <_thumb\+0x190>\)
a392: 4c01 ldr r4, \[pc, #4\] ; \(a398 <_thumb\+0x194>\)
#------------------------------------------------------------------------------
#------ .got offset for tbf4
#------------------------------------------------------------------------------
a394: 000000bc \.word 0x000000bc
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for tbf4
#------------------------------------------------------------------------------
a398: 00006d24 \.word 0x00006d24

View File

@ -0,0 +1,188 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------ 00010004: contains aaf1's .iplt entry
#------ 00010008: contains PC-relative offset of aaf1's .iplt entry
#------ 0001000c: contains atf1's .iplt entry
#------------------------------------------------------------------------------
10000 44332211 c4900000 bc90ffff d4900000 .*
#------------------------------------------------------------------------------
#------ 00010010: contains PC-relative offset of atf1's .iplt entry
#------ 00010014: contains abf1's .iplt entry
#------ 00010018: contains PC-relative offset of abf1's .iplt entry
#------ 0001001c: contains taf1's .iplt entry
#------------------------------------------------------------------------------
10010 c490ffff e4900000 cc90ffff f0900000 .*
#------------------------------------------------------------------------------
#------ 00010020: contains PC-relative offset of taf1's .iplt entry
#------ 00010024: contains ttf1's .iplt entry
#------ 00010028: contains PC-relative offset of ttf1's .iplt entry
#------ 0001002c: contains tbf1's .iplt entry
#------------------------------------------------------------------------------
10020 d090ffff 00910000 d890ffff 10910000 .*
#------------------------------------------------------------------------------
#------ 00010030: contains PC-relative offset of tbf1's .iplt entry
#------ 00010034: contains aaf2's .plt entry
#------ 00010038: contains PC-relative offset of aaf2's .plt entry
#------ 0001003c: contains atf2's .plt entry
#------------------------------------------------------------------------------
10030 e090ffff 5c900000 2490ffff 18900000 .*
#------------------------------------------------------------------------------
#------ 00010040: contains PC-relative offset of atf2's .plt entry
#------ 00010044: contains abf2's .plt entry
#------ 00010048: contains PC-relative offset of abf2's .plt entry
#------ 0001004c: contains taf2's .plt entry
#------------------------------------------------------------------------------
10040 d88fffff b8900000 7090ffff 50900000 .*
#------------------------------------------------------------------------------
#------ 00010050: contains PC-relative offset of taf2's .plt entry
#------ 00010054: contains ttf2's .plt entry
#------ 00010058: contains PC-relative offset of ttf2's .plt entry
#------ 0001005c: contains tbf2's .plt entry
#------------------------------------------------------------------------------
10050 0090ffff 34900000 dc8fffff 44900000 .*
#------------------------------------------------------------------------------
#------ 00010060: contains PC-relative offset of tbf2's .plt entry
#------ 00010064: contains aaf3
#------ 00010068: contains PC-relative offset of aaf3
#------ 0001006c: contains atf3
#------------------------------------------------------------------------------
10060 e48fffff 68910000 0091ffff 20910000 .*
#------------------------------------------------------------------------------
#------ 00010070: contains PC-relative offset of atf3
#------ 00010074: contains abf3
#------ 00010078: contains PC-relative offset of abf3
#------ 0001007c: contains taf3
#------------------------------------------------------------------------------
10070 b090ffff 30910000 b890ffff 5c910000 .*
#------------------------------------------------------------------------------
#------ 00010080: contains PC-relative offset of taf3
#------ 00010084: contains ttf3
#------ 00010088: contains PC-relative offset of ttf3
#------ 0001008c: contains tbf3
#------------------------------------------------------------------------------
10080 dc90ffff 40910000 b890ffff 50910000 .*
#------------------------------------------------------------------------------
#------ 00010090: contains PC-relative offset of tbf3
#------ 00010094: contains aaf4's .plt entry
#------ 00010098: contains PC-relative offset of aaf4's .plt entry
#------ 0001009c: contains atf4's .plt entry
#------------------------------------------------------------------------------
10090 c090ffff 24900000 8c8fffff 9c900000 .*
#------------------------------------------------------------------------------
#------ 000100a0: contains PC-relative offset of atf4's .plt entry
#------ 000100a4: contains abf4's .plt entry
#------ 000100a8: contains PC-relative offset of abf4's .plt entry
#------ 000100ac: contains taf4's .plt entry
#------------------------------------------------------------------------------
100a0 fc8fffff 6c900000 c48fffff a8900000 .*
#------------------------------------------------------------------------------
#------ 000100b0: contains PC-relative offset of taf4's .plt entry
#------ 000100b4: contains ttf4's .plt entry
#------ 000100b8: contains PC-relative offset of ttf4's .plt entry
#------ 000100bc: contains tbf4's .plt entry
#------------------------------------------------------------------------------
100b0 f88fffff 8c900000 d48fffff 7c900000 .*
#------------------------------------------------------------------------------
#------ 000100c0: contains PC-relative offset of tbf4's .plt entry
#------------------------------------------------------------------------------
100c0 bc8fffff .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: atf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: aaf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011014: ttf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011018: tbf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001101c: taf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11010 00900000 00900000 00900000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011020: aaf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011024: abf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011028: tbf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001102c: ttf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11020 00900000 00900000 00900000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011030: atf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011034: taf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011038: abf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001103c: aaf1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11030 00900000 00900000 00900000 00a00000 .*
#------------------------------------------------------------------------------
#------ 00011040: atf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011044: abf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011048: taf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001104c: ttf1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11040 04a00000 08a00000 0da00000 0fa00000 .*
#------------------------------------------------------------------------------
#------ 00011050: tbf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011054: atf3's .igot.plt pointer to 0xa018 [R_ARM_IRELATIVE]
#------ 00011058: abf3's .igot.plt pointer to 0xa01c [R_ARM_IRELATIVE]
#------ 0001105c: ttf3's .igot.plt pointer to 0xa023 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11050 11a00000 18a00000 1ca00000 23a00000 .*
#------------------------------------------------------------------------------
#------ 00011060: tbf3's .igot.plt pointer to 0xa025 [R_ARM_IRELATIVE]
#------ 00011064: taf3's .igot.plt pointer to 0xa021 [R_ARM_IRELATIVE]
#------ 00011068: aaf3's .igot.plt pointer to 0xa014 [R_ARM_IRELATIVE]
#------ 0001106c: .got entry for foo
#------------------------------------------------------------------------------
11060 25a00000 21a00000 14a00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011070: .got entry for aaf1's .iplt entry
#------ 00011074: .got entry for atf1's .iplt entry
#------ 00011078: .got entry for abf1's .iplt entry
#------ 0001107c: .got entry for taf1's .iplt entry
#------------------------------------------------------------------------------
11070 c4900000 d4900000 e4900000 f0900000 .*
#------------------------------------------------------------------------------
#------ 00011080: .got entry for ttf1's .iplt entry
#------ 00011084: .got entry for tbf1's .iplt entry
#------ 00011088: .got entry for foo
#------ 0001108c: .got entry for atf2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11080 00910000 10910000 00000100 00000000 .*
#------------------------------------------------------------------------------
#------ 00011090: .got entry for aaf4 [R_ARM_GLOB_DAT]
#------ 00011094: .got entry for ttf2 [R_ARM_GLOB_DAT]
#------ 00011098: .got entry for tbf2 [R_ARM_GLOB_DAT]
#------ 0001109c: .got entry for atf3
#------------------------------------------------------------------------------
11090 00000000 00000000 00000000 20910000 .*
#------------------------------------------------------------------------------
#------ 000110a0: .got entry for abf3
#------ 000110a4: .got entry for taf2 [R_ARM_GLOB_DAT]
#------ 000110a8: .got entry for aaf2 [R_ARM_GLOB_DAT]
#------ 000110ac: .got entry for ttf3
#------------------------------------------------------------------------------
110a0 30910000 00000000 00000000 40910000 .*
#------------------------------------------------------------------------------
#------ 000110b0: .got entry for tbf3
#------ 000110b4: .got entry for taf3
#------ 000110b8: .got entry for abf4 [R_ARM_GLOB_DAT]
#------ 000110bc: .got entry for tbf4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
110b0 50910000 5c910000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000110c0: .got entry for ttf4 [R_ARM_GLOB_DAT]
#------ 000110c4: .got entry for aaf3
#------ 000110c8: .got entry for atf4 [R_ARM_GLOB_DAT]
#------ 000110cc: .got entry for taf4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
110c0 00000000 68910000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000110d0: .got entry for abf2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
110d0 00000000 .*

View File

@ -0,0 +1,42 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 24 entries:
Offset Info Type Sym\.Value Sym\. Name
0001103c ......a0 R_ARM_IRELATIVE
00011040 ......a0 R_ARM_IRELATIVE
00011044 ......a0 R_ARM_IRELATIVE
00011048 ......a0 R_ARM_IRELATIVE
0001104c ......a0 R_ARM_IRELATIVE
00011050 ......a0 R_ARM_IRELATIVE
00011054 ......a0 R_ARM_IRELATIVE
00011058 ......a0 R_ARM_IRELATIVE
0001105c ......a0 R_ARM_IRELATIVE
00011060 ......a0 R_ARM_IRELATIVE
00011064 ......a0 R_ARM_IRELATIVE
00011068 ......a0 R_ARM_IRELATIVE
0001108c ......15 R_ARM_GLOB_DAT 00009018 atf2
00011090 ......15 R_ARM_GLOB_DAT 00009024 aaf4
00011094 ......15 R_ARM_GLOB_DAT 00009034 ttf2
00011098 ......15 R_ARM_GLOB_DAT 00009044 tbf2
000110a4 ......15 R_ARM_GLOB_DAT 00009050 taf2
000110a8 ......15 R_ARM_GLOB_DAT 0000905c aaf2
000110b8 ......15 R_ARM_GLOB_DAT 0000906c abf4
000110bc ......15 R_ARM_GLOB_DAT 0000907c tbf4
000110c0 ......15 R_ARM_GLOB_DAT 0000908c ttf4
000110c8 ......15 R_ARM_GLOB_DAT 0000909c atf4
000110cc ......15 R_ARM_GLOB_DAT 000090a8 taf4
000110d0 ......15 R_ARM_GLOB_DAT 000090b8 abf2
Relocation section '\.rel\.plt' at offset 0x80c0 contains 12 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT 00009018 atf2
00011010 ......16 R_ARM_JUMP_SLOT 00009024 aaf4
00011014 ......16 R_ARM_JUMP_SLOT 00009034 ttf2
00011018 ......16 R_ARM_JUMP_SLOT 00009044 tbf2
0001101c ......16 R_ARM_JUMP_SLOT 00009050 taf2
00011020 ......16 R_ARM_JUMP_SLOT 0000905c aaf2
00011024 ......16 R_ARM_JUMP_SLOT 0000906c abf4
00011028 ......16 R_ARM_JUMP_SLOT 0000907c tbf4
0001102c ......16 R_ARM_JUMP_SLOT 0000908c ttf4
00011030 ......16 R_ARM_JUMP_SLOT 0000909c atf4
00011034 ......16 R_ARM_JUMP_SLOT 000090a8 taf4
00011038 ......16 R_ARM_JUMP_SLOT 000090b8 abf2

View File

@ -0,0 +1,90 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro define2,name
define aa\name,.arm
define at\name,.arm
define ab\name,.arm
define ta\name,.thumb_func
define tt\name,.thumb_func
define tb\name,.thumb_func
.endm
.macro test_relocs,name,width
bl \name(PLT)
b\width \name
beq\width \name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.macro test_relocs2,name,type,width
test_relocs a\type\name,\width
test_relocs t\type\name,\width
test_relocs ab\name,\width
test_relocs tb\name,\width
.endm
.macro diff,name
.word \name
.word \name-.
.endm
.macro alldirs,doit,name
\doit aa\name
\doit at\name
\doit ab\name
\doit ta\name
\doit tt\name
\doit tb\name
.endm
define2 f1
# f2 provided by ifunc-4.so
define2 f3
# f4 provided by ifunc-4.so
alldirs .globl,f3
alldirs .hidden,f3
.globl _start
.type _start,%function
.arm
_start:
test_relocs foo
test_relocs2 f1,a,
test_relocs2 f2,a,
test_relocs2 f3,a,
test_relocs2 f4,a,
.size _start,.-_start
.globl _thumb
.type _thumb,%function
.thumb_func
_thumb:
test_relocs foo
test_relocs2 f1,t,.w
test_relocs2 f2,t,.w
test_relocs2 f3,t,.w
test_relocs2 f4,t,.w
.size _thumb,.-_thumb
.data
foo:
.word 0x11223344
alldirs diff,f1
alldirs diff,f2
alldirs diff,f3
alldirs diff,f4

View File

@ -0,0 +1,95 @@
.*
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f2>:
a004: e1a0f00e mov pc, lr
0000a008 <f3>:
a008: e1a0f00e mov pc, lr
0000a00c <f1t>:
a00c: 46f7 mov pc, lr
0000a00e <f2t>:
a00e: 46f7 mov pc, lr
0000a010 <f3t>:
a010: 46f7 mov pc, lr
0000a012 <_start>:
a012: f8df 4004 ldr\.w r4, \[pc, #4\] ; a018 <_start\+0x6>
a016: 4c01 ldr r4, \[pc, #4\] ; \(a01c <_start\+0xa>\)
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a018: 00000018 \.word 0x00000018
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a01c: 00006ff0 \.word 0x00006ff0
a020: 4c00 ldr r4, \[pc, #0\] ; \(a024 <_start\+0x12>\)
a022: 4c01 ldr r4, \[pc, #4\] ; \(a028 <_start\+0x16>\)
#------------------------------------------------------------------------------
#------ .got offset for f1
#------------------------------------------------------------------------------
a024: 00000010 \.word 0x00000010
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1
#------------------------------------------------------------------------------
a028: 00006fe8 \.word 0x00006fe8
a02c: 4c00 ldr r4, \[pc, #0\] ; \(a030 <_start\+0x1e>\)
a02e: 4c01 ldr r4, \[pc, #4\] ; \(a034 <_start\+0x22>\)
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a030: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a034: 00006ff0 \.word 0x00006ff0
a038: 4c00 ldr r4, \[pc, #0\] ; \(a03c <_start\+0x2a>\)
a03a: 4c01 ldr r4, \[pc, #4\] ; \(a040 <_start\+0x2e>\)
#------------------------------------------------------------------------------
#------ .got offset for f3
#------------------------------------------------------------------------------
a03c: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3
#------------------------------------------------------------------------------
a040: 00006fe0 \.word 0x00006fe0
a044: 4c00 ldr r4, \[pc, #0\] ; \(a048 <_start\+0x36>\)
a046: 4c01 ldr r4, \[pc, #4\] ; \(a04c <_start\+0x3a>\)
#------------------------------------------------------------------------------
#------ .got offset for f1t
#------------------------------------------------------------------------------
a048: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1t
#------------------------------------------------------------------------------
a04c: 00006fc8 \.word 0x00006fc8
a050: 4c00 ldr r4, \[pc, #0\] ; \(a054 <_start\+0x42>\)
a052: 4c01 ldr r4, \[pc, #4\] ; \(a058 <_start\+0x46>\)
#------------------------------------------------------------------------------
#------ .got offset for f2t
#------------------------------------------------------------------------------
a054: 0000001c \.word 0x0000001c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2t
#------------------------------------------------------------------------------
a058: 00006fc4 \.word 0x00006fc4
a05c: 4c00 ldr r4, \[pc, #0\] ; \(a060 <_start\+0x4e>\)
a05e: 4c01 ldr r4, \[pc, #4\] ; \(a064 <_start\+0x52>\)
#------------------------------------------------------------------------------
#------ .got offset for f3t
#------------------------------------------------------------------------------
a060: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3t
#------------------------------------------------------------------------------
a064: 00006fc4 \.word 0x00006fc4

View File

@ -0,0 +1,29 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 30800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: .got entry for foo
#------------------------------------------------------------------------------
11000 00000000 00000000 00000000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011010: .got entry for f1 [R_ARM_IRELATIVE]
#------ 00011014: .got entry for f1t [R_ARM_IRELATIVE]
#------ 00011018: .got entry for foo
#------ 0001101c: .got entry for f2t [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11010 00a00000 0da00000 00000100 0fa00000 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for f3 [R_ARM_IRELATIVE]
#------ 00011024: .got entry for f2 [R_ARM_IRELATIVE]
#------ 00011028: .got entry for f3t [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 08a00000 04a00000 11a00000 .*

View File

@ -0,0 +1,11 @@
There is no dynamic section in this file\.
Relocation section '\.rel\.dyn' at offset 0x8000 contains 6 entries:
Offset Info Type Sym\.Value Sym\. Name
00011010 ......a0 R_ARM_IRELATIVE
00011024 ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
0001101c ......a0 R_ARM_IRELATIVE
00011028 ......a0 R_ARM_IRELATIVE

View File

@ -0,0 +1,52 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.global f2
.global f2t
.global f3
.hidden f3
.global f3t
.hidden f3t
define f1,.arm
define f2,.arm
define f3,.arm
define f1t,.thumb_func
define f2t,.thumb_func
define f3t,.thumb_func
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f1t
test_relocs f2t
test_relocs f3t
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,95 @@
.*
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f2>:
a004: e1a0f00e mov pc, lr
0000a008 <f3>:
a008: e1a0f00e mov pc, lr
0000a00c <f1t>:
a00c: 46f7 mov pc, lr
0000a00e <f2t>:
a00e: 46f7 mov pc, lr
0000a010 <f3t>:
a010: 46f7 mov pc, lr
0000a012 <_start>:
a012: f8df 4004 ldr\.w r4, \[pc, #4\] ; a018 <_start\+0x6>
a016: 4c01 ldr r4, \[pc, #4\] ; \(a01c <_start\+0xa>\)
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a018: 00000018 \.word 0x00000018
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a01c: 00006ff0 \.word 0x00006ff0
a020: 4c00 ldr r4, \[pc, #0\] ; \(a024 <_start\+0x12>\)
a022: 4c01 ldr r4, \[pc, #4\] ; \(a028 <_start\+0x16>\)
#------------------------------------------------------------------------------
#------ .got offset for f1
#------------------------------------------------------------------------------
a024: 00000010 \.word 0x00000010
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1
#------------------------------------------------------------------------------
a028: 00006fe8 \.word 0x00006fe8
a02c: 4c00 ldr r4, \[pc, #0\] ; \(a030 <_start\+0x1e>\)
a02e: 4c01 ldr r4, \[pc, #4\] ; \(a034 <_start\+0x22>\)
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a030: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a034: 00006ff0 \.word 0x00006ff0
a038: 4c00 ldr r4, \[pc, #0\] ; \(a03c <_start\+0x2a>\)
a03a: 4c01 ldr r4, \[pc, #4\] ; \(a040 <_start\+0x2e>\)
#------------------------------------------------------------------------------
#------ .got offset for f3
#------------------------------------------------------------------------------
a03c: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3
#------------------------------------------------------------------------------
a040: 00006fe0 \.word 0x00006fe0
a044: 4c00 ldr r4, \[pc, #0\] ; \(a048 <_start\+0x36>\)
a046: 4c01 ldr r4, \[pc, #4\] ; \(a04c <_start\+0x3a>\)
#------------------------------------------------------------------------------
#------ .got offset for f1t
#------------------------------------------------------------------------------
a048: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1t
#------------------------------------------------------------------------------
a04c: 00006fc8 \.word 0x00006fc8
a050: 4c00 ldr r4, \[pc, #0\] ; \(a054 <_start\+0x42>\)
a052: 4c01 ldr r4, \[pc, #4\] ; \(a058 <_start\+0x46>\)
#------------------------------------------------------------------------------
#------ .got offset for f2t
#------------------------------------------------------------------------------
a054: 0000001c \.word 0x0000001c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2t
#------------------------------------------------------------------------------
a058: 00006fc4 \.word 0x00006fc4
a05c: 4c00 ldr r4, \[pc, #0\] ; \(a060 <_start\+0x4e>\)
a05e: 4c01 ldr r4, \[pc, #4\] ; \(a064 <_start\+0x52>\)
#------------------------------------------------------------------------------
#------ .got offset for f3t
#------------------------------------------------------------------------------
a060: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3t
#------------------------------------------------------------------------------
a064: 00006fc4 \.word 0x00006fc4

View File

@ -0,0 +1,39 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------ 00010004: contains f1 [R_ARM_IRELATIVE]
#------ 00010008: f2 [R_ARM_ABS32]
#------ 0001000c: contains f3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10000 44332211 00a00000 00000000 08a00000 .*
#------------------------------------------------------------------------------
#------ 00010010: contains f1t [R_ARM_IRELATIVE]
#------ 00010014: f2t [R_ARM_ABS32]
#------ 00010018: contains f3t [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10010 0da00000 00000000 11a00000 80800000 .*
10020 80800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: .got entry for foo [R_ARM_RELATIVE]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011010: .got entry for f1 [R_ARM_IRELATIVE]
#------ 00011014: .got entry for f1t [R_ARM_IRELATIVE]
#------ 00011018: .got entry for foo [R_ARM_RELATIVE]
#------ 0001101c: .got entry for f2t [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11010 00a00000 0da00000 00000100 00000000 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for f3 [R_ARM_IRELATIVE]
#------ 00011024: .got entry for f2 [R_ARM_GLOB_DAT]
#------ 00011028: .got entry for f3t [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 08a00000 00000000 11a00000 .*

View File

@ -0,0 +1,19 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 16 entries:
Offset Info Type Sym\.Value Sym\. Name
0001001c ......17 R_ARM_RELATIVE
00010020 ......17 R_ARM_RELATIVE
0001100c ......17 R_ARM_RELATIVE
00011018 ......17 R_ARM_RELATIVE
00010004 ......a0 R_ARM_IRELATIVE
0001000c ......a0 R_ARM_IRELATIVE
00010010 ......a0 R_ARM_IRELATIVE
00010018 ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE
00011028 ......a0 R_ARM_IRELATIVE
00010008 ......02 R_ARM_ABS32 f2\(\) f2
00011024 ......15 R_ARM_GLOB_DAT f2\(\) f2
00010014 ......02 R_ARM_ABS32 f2t\(\) f2t
0001101c ......15 R_ARM_GLOB_DAT f2t\(\) f2t

View File

@ -0,0 +1,58 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.global f2
.global f2t
.global f3
.hidden f3
.global f3t
.hidden f3t
define f1,.arm
define f2,.arm
define f3,.arm
define f1t,.thumb_func
define f2t,.thumb_func
define f3t,.thumb_func
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f1t
test_relocs f2t
test_relocs f3t
.size _start,.-_start
.data
foo:
.word 0x11223344
.word f1
.word f2
.word f3
.word f1t
.word f2t
.word f3t
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,89 @@
.*
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f3>:
a004: e1a0f00e mov pc, lr
0000a008 <f1t>:
a008: 46f7 mov pc, lr
0000a00a <f3t>:
a00a: 46f7 mov pc, lr
0000a00c <_start>:
a00c: 4c00 ldr r4, \[pc, #0\] ; \(a010 <_start\+0x4>\)
a00e: 4c01 ldr r4, \[pc, #4\] ; \(a014 <_start\+0x8>\)
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a010: 00000018 \.word 0x00000018
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a014: 00006ff8 \.word 0x00006ff8
a018: 4c00 ldr r4, \[pc, #0\] ; \(a01c <_start\+0x10>\)
a01a: 4c01 ldr r4, \[pc, #4\] ; \(a020 <_start\+0x14>\)
#------------------------------------------------------------------------------
#------ .got offset for f1
#------------------------------------------------------------------------------
a01c: 00000010 \.word 0x00000010
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1
#------------------------------------------------------------------------------
a020: 00006ff0 \.word 0x00006ff0
a024: 4c00 ldr r4, \[pc, #0\] ; \(a028 <_start\+0x1c>\)
a026: 4c01 ldr r4, \[pc, #4\] ; \(a02c <_start\+0x20>\)
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a028: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a02c: 00006ff8 \.word 0x00006ff8
a030: 4c00 ldr r4, \[pc, #0\] ; \(a034 <_start\+0x28>\)
a032: 4c01 ldr r4, \[pc, #4\] ; \(a038 <_start\+0x2c>\)
#------------------------------------------------------------------------------
#------ .got offset for f3
#------------------------------------------------------------------------------
a034: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3
#------------------------------------------------------------------------------
a038: 00006fe8 \.word 0x00006fe8
a03c: 4c00 ldr r4, \[pc, #0\] ; \(a040 <_start\+0x34>\)
a03e: 4c01 ldr r4, \[pc, #4\] ; \(a044 <_start\+0x38>\)
#------------------------------------------------------------------------------
#------ .got offset for f1t
#------------------------------------------------------------------------------
a040: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1t
#------------------------------------------------------------------------------
a044: 00006fd0 \.word 0x00006fd0
a048: 4c00 ldr r4, \[pc, #0\] ; \(a04c <_start\+0x40>\)
a04a: 4c01 ldr r4, \[pc, #4\] ; \(a050 <_start\+0x44>\)
#------------------------------------------------------------------------------
#------ .got offset for f2t
#------------------------------------------------------------------------------
a04c: 0000001c \.word 0x0000001c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2t
#------------------------------------------------------------------------------
a050: 00006fcc \.word 0x00006fcc
a054: 4c00 ldr r4, \[pc, #0\] ; \(a058 <_start\+0x4c>\)
a056: 4c01 ldr r4, \[pc, #4\] ; \(a05c <_start\+0x50>\)
#------------------------------------------------------------------------------
#------ .got offset for f3t
#------------------------------------------------------------------------------
a058: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3t
#------------------------------------------------------------------------------
a05c: 00006fcc \.word 0x00006fcc

View File

@ -0,0 +1,29 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 30800000 30800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: .got entry for foo
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011010: .got entry for f1 [R_ARM_IRELATIVE]
#------ 00011014: .got entry for f1t [R_ARM_IRELATIVE]
#------ 00011018: .got entry for foo
#------ 0001101c: .got entry for f2t [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11010 00a00000 09a00000 00000100 00000000 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for f3 [R_ARM_IRELATIVE]
#------ 00011024: .got entry for f2 [R_ARM_GLOB_DAT]
#------ 00011028: .got entry for f3t [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 04a00000 00000000 0ba00000 .*

View File

@ -0,0 +1,9 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 6 entries:
Offset Info Type Sym\.Value Sym\. Name
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE
00011028 ......a0 R_ARM_IRELATIVE
0001101c ......15 R_ARM_GLOB_DAT 00000000 f2t
00011024 ......15 R_ARM_GLOB_DAT 00000000 f2

View File

@ -0,0 +1,50 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.global f2
.global f2t
.global f3
.hidden f3
.global f3t
.hidden f3t
define f1,.arm
define f3,.arm
define f1t,.thumb_func
define f3t,.thumb_func
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f1t
test_relocs f2t
test_relocs f3t
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,100 @@
.*
Disassembly of section \.plt:
00009000 <\.plt>:
9000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
9004: e59fe004 ldr lr, \[pc, #4\] ; 9010 <__irel_end\+0xff0>
9008: e08fe00e add lr, pc, lr
900c: e5bef008 ldr pc, \[lr, #8\]!
#------------------------------------------------------------------------------
#------ PC-relative offset of .got.plt
#------------------------------------------------------------------------------
9010: 00007ff0 \.word 0x00007ff0
#------------------------------------------------------------------------------
#------ f2t's .plt entry
#------------------------------------------------------------------------------
9014: e28fc600 add ip, pc, #0
9018: e28cca07 add ip, ip, #28672 ; 0x7000
901c: e5bcfff0 ldr pc, \[ip, #4080\]! ; 0xff0
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
9020: e28fc600 add ip, pc, #0
9024: e28cca07 add ip, ip, #28672 ; 0x7000
9028: e5bcffe8 ldr pc, \[ip, #4072\]! ; 0xfe8
Disassembly of section \.iplt:
0000902c <f3-0x18>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe0 ldr pc, \[ip, #4064\]! ; 0xfe0
#------------------------------------------------------------------------------
#------ f1t's .iplt entry
#------------------------------------------------------------------------------
9038: e28fc600 add ip, pc, #0
903c: e28cca07 add ip, ip, #28672 ; 0x7000
9040: e5bcffd8 ldr pc, \[ip, #4056\]! ; 0xfd8
00009044 <f3>:
9044: e28fc600 add ip, pc, #0
9048: e28cca07 add ip, ip, #28672 ; 0x7000
904c: e5bcffd0 ldr pc, \[ip, #4048\]! ; 0xfd0
00009050 <f3t>:
9050: e28fc600 add ip, pc, #0
9054: e28cca07 add ip, ip, #28672 ; 0x7000
9058: e5bcffc8 ldr pc, \[ip, #4040\]! ; 0xfc8
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
a004: e1a0f00e mov pc, lr
0000a008 <f1t>:
a008: 46f7 mov pc, lr
a00a: 46f7 mov pc, lr
0000a00c <_start>:
a00c: f8df 4000 ldr\.w r4, \[pc\] ; a010 <_start\+0x4>
#------------------------------------------------------------------------------
#------ PC-relative offset of foo
#------------------------------------------------------------------------------
a010: 00005ff0 \.word 0x00005ff0
a014: f8df 4000 ldr\.w r4, \[pc\] ; a018 <_start\+0xc>
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a018: fffff014 \.word 0xfffff014
a01c: f8df 4000 ldr\.w r4, \[pc\] ; a020 <_start\+0x14>
#------------------------------------------------------------------------------
#------ PC-relative offset of f2's .plt entry
#------------------------------------------------------------------------------
a020: fffff000 \.word 0xfffff000
a024: f8df 4000 ldr\.w r4, \[pc\] ; a028 <_start\+0x1c>
#------------------------------------------------------------------------------
#------ PC-relative offset of f3
#------------------------------------------------------------------------------
a028: fffff01c \.word 0xfffff01c
a02c: f8df 4000 ldr\.w r4, \[pc\] ; a030 <_start\+0x24>
#------------------------------------------------------------------------------
#------ PC-relative offset of f1t's .iplt entry
#------------------------------------------------------------------------------
a030: fffff008 \.word 0xfffff008
a034: f8df 4000 ldr\.w r4, \[pc\] ; a038 <_start\+0x2c>
#------------------------------------------------------------------------------
#------ PC-relative offset of f2t's .plt entry
#------------------------------------------------------------------------------
a038: ffffefdc \.word 0xffffefdc
a03c: f8df 4000 ldr\.w r4, \[pc\] ; a040 <_start\+0x34>
#------------------------------------------------------------------------------
#------ PC-relative offset of f3t
#------------------------------------------------------------------------------
a040: fffff010 \.word 0xfffff010

View File

@ -0,0 +1,27 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 20800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f2t's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: f2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011014: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: f1t's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001101c: f3's .igot.plt pointer to 0xa004 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11010 00900000 00a00000 09a00000 04a00000 .*
#------------------------------------------------------------------------------
#------ 00011020: f3t's .igot.plt pointer to 0xa00b [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 0ba00000 .*

View File

@ -0,0 +1,12 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 4 entries:
Offset Info Type Sym\.Value Sym\. Name
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE
0001101c ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE
Relocation section '\.rel\.plt' at offset 0x8020 contains 2 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT 00009014 f2t
00011010 ......16 R_ARM_JUMP_SLOT 00009020 f2

View File

@ -0,0 +1,47 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
ldr r4,1f
1:
.word \name - .
.endm
.global f2
.global f2t
.global f3
.hidden f3
.global f3t
.hidden f3t
define f1,.arm
define f3,.arm
define f1t,.thumb_func
define f3t,.thumb_func
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f1t
test_relocs f2t
test_relocs f3t
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,100 @@
.*
Disassembly of section \.plt:
00009000 <\.plt>:
9000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
9004: e59fe004 ldr lr, \[pc, #4\] ; 9010 <__irel_end\+0xff0>
9008: e08fe00e add lr, pc, lr
900c: e5bef008 ldr pc, \[lr, #8\]!
#------------------------------------------------------------------------------
#------ PC-relative offset of .got.plt
#------------------------------------------------------------------------------
9010: 00007ff0 \.word 0x00007ff0
#------------------------------------------------------------------------------
#------ f2t's .plt entry
#------------------------------------------------------------------------------
9014: e28fc600 add ip, pc, #0
9018: e28cca07 add ip, ip, #28672 ; 0x7000
901c: e5bcfff0 ldr pc, \[ip, #4080\]! ; 0xff0
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
9020: e28fc600 add ip, pc, #0
9024: e28cca07 add ip, ip, #28672 ; 0x7000
9028: e5bcffe8 ldr pc, \[ip, #4072\]! ; 0xfe8
Disassembly of section \.iplt:
0000902c <f3-0x18>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe0 ldr pc, \[ip, #4064\]! ; 0xfe0
#------------------------------------------------------------------------------
#------ f1t's .iplt entry
#------------------------------------------------------------------------------
9038: e28fc600 add ip, pc, #0
903c: e28cca07 add ip, ip, #28672 ; 0x7000
9040: e5bcffd8 ldr pc, \[ip, #4056\]! ; 0xfd8
00009044 <f3>:
9044: e28fc600 add ip, pc, #0
9048: e28cca07 add ip, ip, #28672 ; 0x7000
904c: e5bcffd0 ldr pc, \[ip, #4048\]! ; 0xfd0
00009050 <f3t>:
9050: e28fc600 add ip, pc, #0
9054: e28cca07 add ip, ip, #28672 ; 0x7000
9058: e5bcffc8 ldr pc, \[ip, #4040\]! ; 0xfc8
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
a004: e1a0f00e mov pc, lr
0000a008 <f1t>:
a008: 46f7 mov pc, lr
a00a: 46f7 mov pc, lr
0000a00c <_start>:
a00c: f8df 4000 ldr\.w r4, \[pc\] ; a010 <_start\+0x4>
#------------------------------------------------------------------------------
#------ foo
#------------------------------------------------------------------------------
a010: 00010000 \.word 0x00010000
a014: f8df 4000 ldr\.w r4, \[pc\] ; a018 <_start\+0xc>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a018: 0000902c \.word 0x0000902c
a01c: f8df 4000 ldr\.w r4, \[pc\] ; a020 <_start\+0x14>
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
a020: 00009020 \.word 0x00009020
a024: f8df 4000 ldr\.w r4, \[pc\] ; a028 <_start\+0x1c>
#------------------------------------------------------------------------------
#------ f3
#------------------------------------------------------------------------------
a028: 00009044 \.word 0x00009044
a02c: f8df 4000 ldr\.w r4, \[pc\] ; a030 <_start\+0x24>
#------------------------------------------------------------------------------
#------ f1t's .iplt entry
#------------------------------------------------------------------------------
a030: 00009038 \.word 0x00009038
a034: f8df 4000 ldr\.w r4, \[pc\] ; a038 <_start\+0x2c>
#------------------------------------------------------------------------------
#------ f2t's .plt entry
#------------------------------------------------------------------------------
a038: 00009014 \.word 0x00009014
a03c: f8df 4000 ldr\.w r4, \[pc\] ; a040 <_start\+0x34>
#------------------------------------------------------------------------------
#------ f3t
#------------------------------------------------------------------------------
a040: 00009050 \.word 0x00009050

View File

@ -0,0 +1,27 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 20800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f2t's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: f2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011014: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: f1t's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001101c: f3's .igot.plt pointer to 0xa004 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11010 00900000 00a00000 09a00000 04a00000 .*
#------------------------------------------------------------------------------
#------ 00011020: f3t's .igot.plt pointer to 0xa00b [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 0ba00000 .*

View File

@ -0,0 +1,12 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 4 entries:
Offset Info Type Sym\.Value Sym\. Name
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE
0001101c ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE
Relocation section '\.rel\.plt' at offset 0x8020 contains 2 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT 00009014 f2t
00011010 ......16 R_ARM_JUMP_SLOT 00009020 f2

View File

@ -0,0 +1,47 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
ldr r4,1f
1:
.word \name
.endm
.global f2
.global f2t
.global f3
.hidden f3
.global f3t
.hidden f3t
define f1,.arm
define f3,.arm
define f1t,.thumb_func
define f3t,.thumb_func
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f1t
test_relocs f2t
test_relocs f3t
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,88 @@
.*
Disassembly of section \.iplt:
00009000 <f2t-0x18>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
9000: e28fc600 add ip, pc, #0
9004: e28cca08 add ip, ip, #32768 ; 0x8000
9008: e5bcf004 ldr pc, \[ip, #4\]!
#------------------------------------------------------------------------------
#------ f1t's .iplt entry
#------------------------------------------------------------------------------
900c: e28fc600 add ip, pc, #0
9010: e28cca07 add ip, ip, #28672 ; 0x7000
9014: e5bcfffc ldr pc, \[ip, #4092\]! ; 0xffc
00009018 <f2t>:
9018: e28fc600 add ip, pc, #0
901c: e28cca07 add ip, ip, #28672 ; 0x7000
9020: e5bcfff4 ldr pc, \[ip, #4084\]! ; 0xff4
00009024 <f3>:
9024: e28fc600 add ip, pc, #0
9028: e28cca07 add ip, ip, #28672 ; 0x7000
902c: e5bcffec ldr pc, \[ip, #4076\]! ; 0xfec
00009030 <f2>:
9030: e28fc600 add ip, pc, #0
9034: e28cca07 add ip, ip, #28672 ; 0x7000
9038: e5bcffe4 ldr pc, \[ip, #4068\]! ; 0xfe4
0000903c <f3t>:
903c: e28fc600 add ip, pc, #0
9040: e28cca07 add ip, ip, #28672 ; 0x7000
9044: e5bcffdc ldr pc, \[ip, #4060\]! ; 0xfdc
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
a004: e1a0f00e mov pc, lr
a008: e1a0f00e mov pc, lr
0000a00c <f1t>:
a00c: 46f7 mov pc, lr
a00e: 46f7 mov pc, lr
a010: 46f7 mov pc, lr
0000a012 <_start>:
a012: 4c00 ldr r4, \[pc, #0\] ; \(a014 <_start\+0x2>\)
#------------------------------------------------------------------------------
#------ foo
#------------------------------------------------------------------------------
a014: 00010000 \.word 0x00010000
a018: f8df 4000 ldr\.w r4, \[pc\] ; a01c <_start\+0xa>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a01c: 00009000 \.word 0x00009000
a020: f8df 4000 ldr\.w r4, \[pc\] ; a024 <_start\+0x12>
#------------------------------------------------------------------------------
#------ f2
#------------------------------------------------------------------------------
a024: 00009030 \.word 0x00009030
a028: f8df 4000 ldr\.w r4, \[pc\] ; a02c <_start\+0x1a>
#------------------------------------------------------------------------------
#------ f3
#------------------------------------------------------------------------------
a02c: 00009024 \.word 0x00009024
a030: f8df 4000 ldr\.w r4, \[pc\] ; a034 <_start\+0x22>
#------------------------------------------------------------------------------
#------ f1t's .iplt entry
#------------------------------------------------------------------------------
a034: 0000900c \.word 0x0000900c
a038: f8df 4000 ldr\.w r4, \[pc\] ; a03c <_start\+0x2a>
#------------------------------------------------------------------------------
#------ f2t
#------------------------------------------------------------------------------
a03c: 00009018 \.word 0x00009018
a040: f8df 4000 ldr\.w r4, \[pc\] ; a044 <_start\+0x32>
#------------------------------------------------------------------------------
#------ f3t
#------------------------------------------------------------------------------
a044: 0000903c \.word 0x0000903c

View File

@ -0,0 +1,27 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 30800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00a00000 .*
#------------------------------------------------------------------------------
#------ 00011010: f1t's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011014: f2t's .igot.plt pointer to 0xa00f [R_ARM_IRELATIVE]
#------ 00011018: f3's .igot.plt pointer to 0xa008 [R_ARM_IRELATIVE]
#------ 0001101c: f2's .igot.plt pointer to 0xa004 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11010 0da00000 0fa00000 08a00000 04a00000 .*
#------------------------------------------------------------------------------
#------ 00011020: f3t's .igot.plt pointer to 0xa011 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 11a00000 .*

View File

@ -0,0 +1,9 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 6 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE
0001101c ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE

View File

@ -0,0 +1,49 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
ldr r4,1f
1:
.word \name
.endm
.global f2
.global f2t
.global f3
.hidden f3
.global f3t
.hidden f3t
define f1,.arm
define f2,.arm
define f3,.arm
define f1t,.thumb_func
define f2t,.thumb_func
define f3t,.thumb_func
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f1t
test_relocs f2t
test_relocs f3t
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,445 @@
.*
Disassembly of section \.iplt:
00009000 <f7-0x3c>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
9000: e28fc600 add ip, pc, #0
9004: e28cca08 add ip, ip, #32768 ; 0x8000
9008: e5bcf004 ldr pc, \[ip, #4\]!
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
900c: e28fc600 add ip, pc, #0
9010: e28cca07 add ip, ip, #28672 ; 0x7000
9014: e5bcfffc ldr pc, \[ip, #4092\]! ; 0xffc
#------------------------------------------------------------------------------
#------ thumb entry to f3's .iplt entry
#------------------------------------------------------------------------------
9018: 4778 bx pc
901a: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
901c: e28fc600 add ip, pc, #0
9020: e28cca07 add ip, ip, #28672 ; 0x7000
9024: e5bcfff0 ldr pc, \[ip, #4080\]! ; 0xff0
#------------------------------------------------------------------------------
#------ thumb entry to f4's .iplt entry
#------------------------------------------------------------------------------
9028: 4778 bx pc
902a: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe4 ldr pc, \[ip, #4068\]! ; 0xfe4
#------------------------------------------------------------------------------
#------ thumb entry to f7
#------------------------------------------------------------------------------
9038: 4778 bx pc
903a: 46c0 nop ; \(mov r8, r8\)
0000903c <f7>:
903c: e28fc600 add ip, pc, #0
9040: e28cca07 add ip, ip, #28672 ; 0x7000
9044: e5bcffd8 ldr pc, \[ip, #4056\]! ; 0xfd8
00009048 <f5>:
9048: e28fc600 add ip, pc, #0
904c: e28cca07 add ip, ip, #28672 ; 0x7000
9050: e5bcffd0 ldr pc, \[ip, #4048\]! ; 0xfd0
#------------------------------------------------------------------------------
#------ thumb entry to f8
#------------------------------------------------------------------------------
9054: 4778 bx pc
9056: 46c0 nop ; \(mov r8, r8\)
00009058 <f8>:
9058: e28fc600 add ip, pc, #0
905c: e28cca07 add ip, ip, #28672 ; 0x7000
9060: e5bcffc4 ldr pc, \[ip, #4036\]! ; 0xfc4
00009064 <f6>:
9064: e28fc600 add ip, pc, #0
9068: e28cca07 add ip, ip, #28672 ; 0x7000
906c: e5bcffbc ldr pc, \[ip, #4028\]! ; 0xfbc
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f2>:
a004: 46f7 mov pc, lr
\.\.\.
0000a008 <f3>:
a008: e1a0f00e mov pc, lr
0000a00c <f4>:
a00c: 46f7 mov pc, lr
a00e: 0000 movs r0, r0
a010: e1a0f00e mov pc, lr
a014: 46f7 mov pc, lr
a016: 0000 movs r0, r0
a018: e1a0f00e mov pc, lr
a01c: 46f7 mov pc, lr
\.\.\.
0000a020 <_start>:
a020: eb0017f6 bl 10000 <foo>
a024: ea0017f5 b 10000 <foo>
a028: 0a0017f4 beq 10000 <foo>
a02c: e59f4014 ldr r4, \[pc, #20\] ; a048 <_start\+0x28>
a030: e59f4014 ldr r4, \[pc, #20\] ; a04c <_start\+0x2c>
a034: e59f4014 ldr r4, \[pc, #20\] ; a050 <_start\+0x30>
a038: e59f4014 ldr r4, \[pc, #20\] ; a054 <_start\+0x34>
a03c: e59f5014 ldr r5, \[pc, #20\] ; a058 <_start\+0x38>
a040: e3004000 movw r4, #0
a044: e3404001 movt r4, #1
#------------------------------------------------------------------------------
#------ foo
#------------------------------------------------------------------------------
a048: 00010000 \.word 0x00010000
#------------------------------------------------------------------------------
#------ PC-relative offset of foo
#------------------------------------------------------------------------------
a04c: 00005fb4 \.word 0x00005fb4
#------------------------------------------------------------------------------
#------ GP-relative offset of foo
#------------------------------------------------------------------------------
a050: fffff000 \.word 0xfffff000
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a054: 00000040 \.word 0x00000040
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a058: 00006fd4 \.word 0x00006fd4
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a05c: ebfffbe7 bl 9000 <f7-0x3c>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a060: eafffbe6 b 9000 <f7-0x3c>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a064: 0afffbe5 beq 9000 <f7-0x3c>
a068: e59f4014 ldr r4, \[pc, #20\] ; a084 <_start\+0x64>
a06c: e59f4014 ldr r4, \[pc, #20\] ; a088 <_start\+0x68>
a070: e59f4014 ldr r4, \[pc, #20\] ; a08c <_start\+0x6c>
a074: e59f4014 ldr r4, \[pc, #20\] ; a090 <_start\+0x70>
a078: e59f5014 ldr r5, \[pc, #20\] ; a094 <_start\+0x74>
a07c: e3094000 movw r4, #36864 ; 0x9000
a080: e3404000 movt r4, #0
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a084: 00009000 \.word 0x00009000
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a088: ffffef78 \.word 0xffffef78
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a08c: ffff8000 \.word 0xffff8000
#------------------------------------------------------------------------------
#------ .got offset for f1's .iplt entry
#------------------------------------------------------------------------------
a090: 00000030 \.word 0x00000030
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1's .iplt entry
#------------------------------------------------------------------------------
a094: 00006f9c \.word 0x00006f9c
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a098: ebfffbdb bl 900c <f7-0x30>
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a09c: eafffbda b 900c <f7-0x30>
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a0a0: 0afffbd9 beq 900c <f7-0x30>
a0a4: e59f4014 ldr r4, \[pc, #20\] ; a0c0 <_start\+0xa0>
a0a8: e59f4014 ldr r4, \[pc, #20\] ; a0c4 <_start\+0xa4>
a0ac: e59f4014 ldr r4, \[pc, #20\] ; a0c8 <_start\+0xa8>
a0b0: e59f4014 ldr r4, \[pc, #20\] ; a0cc <_start\+0xac>
a0b4: e59f5014 ldr r5, \[pc, #20\] ; a0d0 <_start\+0xb0>
a0b8: e309400c movw r4, #36876 ; 0x900c
a0bc: e3404000 movt r4, #0
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a0c0: 0000900c \.word 0x0000900c
#------------------------------------------------------------------------------
#------ PC-relative offset of f2's .iplt entry
#------------------------------------------------------------------------------
a0c4: ffffef48 \.word 0xffffef48
#------------------------------------------------------------------------------
#------ GP-relative offset of f2's .iplt entry
#------------------------------------------------------------------------------
a0c8: ffff800c \.word 0xffff800c
#------------------------------------------------------------------------------
#------ .got offset for f2's .iplt entry
#------------------------------------------------------------------------------
a0cc: 00000034 \.word 0x00000034
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2's .iplt entry
#------------------------------------------------------------------------------
a0d0: 00006f64 \.word 0x00006f64
a0d4: ebfffbdb bl 9048 <f5>
a0d8: eafffbda b 9048 <f5>
a0dc: 0afffbd9 beq 9048 <f5>
a0e0: e59f4014 ldr r4, \[pc, #20\] ; a0fc <_start\+0xdc>
a0e4: e59f4014 ldr r4, \[pc, #20\] ; a100 <_start\+0xe0>
a0e8: e59f4014 ldr r4, \[pc, #20\] ; a104 <_start\+0xe4>
a0ec: e59f4014 ldr r4, \[pc, #20\] ; a108 <_start\+0xe8>
a0f0: e59f5014 ldr r5, \[pc, #20\] ; a10c <_start\+0xec>
a0f4: e3094048 movw r4, #36936 ; 0x9048
a0f8: e3404000 movt r4, #0
#------------------------------------------------------------------------------
#------ f5
#------------------------------------------------------------------------------
a0fc: 00009048 \.word 0x00009048
#------------------------------------------------------------------------------
#------ PC-relative offset of f5
#------------------------------------------------------------------------------
a100: ffffef48 \.word 0xffffef48
#------------------------------------------------------------------------------
#------ GP-relative offset of f5
#------------------------------------------------------------------------------
a104: ffff8048 \.word 0xffff8048
#------------------------------------------------------------------------------
#------ .got offset for f5
#------------------------------------------------------------------------------
a108: 00000048 \.word 0x00000048
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f5
#------------------------------------------------------------------------------
a10c: 00006f3c \.word 0x00006f3c
a110: ebfffbd3 bl 9064 <f6>
a114: eafffbd2 b 9064 <f6>
a118: 0afffbd1 beq 9064 <f6>
a11c: e59f4014 ldr r4, \[pc, #20\] ; a138 <_start\+0x118>
a120: e59f4014 ldr r4, \[pc, #20\] ; a13c <_start\+0x11c>
a124: e59f4014 ldr r4, \[pc, #20\] ; a140 <_start\+0x120>
a128: e59f4014 ldr r4, \[pc, #20\] ; a144 <_start\+0x124>
a12c: e59f5014 ldr r5, \[pc, #20\] ; a148 <_start\+0x128>
a130: e3094064 movw r4, #36964 ; 0x9064
a134: e3404000 movt r4, #0
#------------------------------------------------------------------------------
#------ f6
#------------------------------------------------------------------------------
a138: 00009064 \.word 0x00009064
#------------------------------------------------------------------------------
#------ PC-relative offset of f6
#------------------------------------------------------------------------------
a13c: ffffef28 \.word 0xffffef28
#------------------------------------------------------------------------------
#------ GP-relative offset of f6
#------------------------------------------------------------------------------
a140: ffff8064 \.word 0xffff8064
#------------------------------------------------------------------------------
#------ .got offset for f6
#------------------------------------------------------------------------------
a144: 00000050 \.word 0x00000050
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f6
#------------------------------------------------------------------------------
a148: 00006f08 \.word 0x00006f08
0000a14c <_thumb>:
a14c: f005 ff58 bl 10000 <foo>
a150: f005 bf56 b\.w 10000 <foo>
a154: f005 8754 beq\.w 10000 <foo>
a158: 4c04 ldr r4, \[pc, #16\] ; \(a16c <_thumb\+0x20>\)
a15a: f8df 4014 ldr\.w r4, \[pc, #20\] ; a170 <_thumb\+0x24>
a15e: 4c05 ldr r4, \[pc, #20\] ; \(a174 <_thumb\+0x28>\)
a160: 4c05 ldr r4, \[pc, #20\] ; \(a178 <_thumb\+0x2c>\)
a162: 4d06 ldr r5, \[pc, #24\] ; \(a17c <_thumb\+0x30>\)
a164: f240 0400 movw r4, #0
a168: f2c0 0401 movt r4, #1
#------------------------------------------------------------------------------
#------ foo
#------------------------------------------------------------------------------
a16c: 00010000 \.word 0x00010000
#------------------------------------------------------------------------------
#------ PC-relative offset of foo
#------------------------------------------------------------------------------
a170: 00005e90 \.word 0x00005e90
#------------------------------------------------------------------------------
#------ GP-relative offset of foo
#------------------------------------------------------------------------------
a174: fffff000 \.word 0xfffff000
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a178: 00000040 \.word 0x00000040
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a17c: 00006eb0 \.word 0x00006eb0
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
a180: f7fe ef4c blx 901c <f7-0x20>
#------------------------------------------------------------------------------
#------ thumb entry to f3's .iplt entry
#------------------------------------------------------------------------------
a184: f7fe bf48 b\.w 9018 <f7-0x24>
#------------------------------------------------------------------------------
#------ thumb entry to f3's .iplt entry
#------------------------------------------------------------------------------
a188: f43e af46 beq\.w 9018 <f7-0x24>
a18c: 4c04 ldr r4, \[pc, #16\] ; \(a1a0 <_thumb\+0x54>\)
a18e: f8df 4014 ldr\.w r4, \[pc, #20\] ; a1a4 <_thumb\+0x58>
a192: 4c05 ldr r4, \[pc, #20\] ; \(a1a8 <_thumb\+0x5c>\)
a194: 4c05 ldr r4, \[pc, #20\] ; \(a1ac <_thumb\+0x60>\)
a196: 4d06 ldr r5, \[pc, #24\] ; \(a1b0 <_thumb\+0x64>\)
a198: f249 041c movw r4, #36892 ; 0x901c
a19c: f2c0 0400 movt r4, #0
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
a1a0: 0000901c \.word 0x0000901c
#------------------------------------------------------------------------------
#------ PC-relative offset of f3's .iplt entry
#------------------------------------------------------------------------------
a1a4: ffffee78 \.word 0xffffee78
#------------------------------------------------------------------------------
#------ GP-relative offset of f3's .iplt entry
#------------------------------------------------------------------------------
a1a8: ffff801c \.word 0xffff801c
#------------------------------------------------------------------------------
#------ .got offset for f3's .iplt entry
#------------------------------------------------------------------------------
a1ac: 00000038 \.word 0x00000038
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3's .iplt entry
#------------------------------------------------------------------------------
a1b0: 00006e88 \.word 0x00006e88
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
a1b4: f7fe ef3a blx 902c <f7-0x10>
#------------------------------------------------------------------------------
#------ thumb entry to f4's .iplt entry
#------------------------------------------------------------------------------
a1b8: f7fe bf36 b\.w 9028 <f7-0x14>
#------------------------------------------------------------------------------
#------ thumb entry to f4's .iplt entry
#------------------------------------------------------------------------------
a1bc: f43e af34 beq\.w 9028 <f7-0x14>
a1c0: 4c04 ldr r4, \[pc, #16\] ; \(a1d4 <_thumb\+0x88>\)
a1c2: f8df 4014 ldr\.w r4, \[pc, #20\] ; a1d8 <_thumb\+0x8c>
a1c6: 4c05 ldr r4, \[pc, #20\] ; \(a1dc <_thumb\+0x90>\)
a1c8: 4c05 ldr r4, \[pc, #20\] ; \(a1e0 <_thumb\+0x94>\)
a1ca: 4d06 ldr r5, \[pc, #24\] ; \(a1e4 <_thumb\+0x98>\)
a1cc: f249 042c movw r4, #36908 ; 0x902c
a1d0: f2c0 0400 movt r4, #0
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
a1d4: 0000902c \.word 0x0000902c
#------------------------------------------------------------------------------
#------ PC-relative offset of f4's .iplt entry
#------------------------------------------------------------------------------
a1d8: ffffee54 \.word 0xffffee54
#------------------------------------------------------------------------------
#------ GP-relative offset of f4's .iplt entry
#------------------------------------------------------------------------------
a1dc: ffff802c \.word 0xffff802c
#------------------------------------------------------------------------------
#------ .got offset for f4's .iplt entry
#------------------------------------------------------------------------------
a1e0: 0000003c \.word 0x0000003c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f4's .iplt entry
#------------------------------------------------------------------------------
a1e4: 00006e58 \.word 0x00006e58
a1e8: f7fe ef28 blx 903c <f7>
#------------------------------------------------------------------------------
#------ thumb entry to f7
#------------------------------------------------------------------------------
a1ec: f7fe bf24 b\.w 9038 <f7-0x4>
#------------------------------------------------------------------------------
#------ thumb entry to f7
#------------------------------------------------------------------------------
a1f0: f43e af22 beq\.w 9038 <f7-0x4>
a1f4: 4c04 ldr r4, \[pc, #16\] ; \(a208 <_thumb\+0xbc>\)
a1f6: f8df 4014 ldr\.w r4, \[pc, #20\] ; a20c <_thumb\+0xc0>
a1fa: 4c05 ldr r4, \[pc, #20\] ; \(a210 <_thumb\+0xc4>\)
a1fc: 4c05 ldr r4, \[pc, #20\] ; \(a214 <_thumb\+0xc8>\)
a1fe: 4d06 ldr r5, \[pc, #24\] ; \(a218 <_thumb\+0xcc>\)
a200: f249 043c movw r4, #36924 ; 0x903c
a204: f2c0 0400 movt r4, #0
#------------------------------------------------------------------------------
#------ f7
#------------------------------------------------------------------------------
a208: 0000903c \.word 0x0000903c
#------------------------------------------------------------------------------
#------ PC-relative offset of f7
#------------------------------------------------------------------------------
a20c: ffffee30 \.word 0xffffee30
#------------------------------------------------------------------------------
#------ GP-relative offset of f7
#------------------------------------------------------------------------------
a210: ffff803c \.word 0xffff803c
#------------------------------------------------------------------------------
#------ .got offset for f7
#------------------------------------------------------------------------------
a214: 00000044 \.word 0x00000044
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f7
#------------------------------------------------------------------------------
a218: 00006e2c \.word 0x00006e2c
a21c: f7fe ef1c blx 9058 <f8>
#------------------------------------------------------------------------------
#------ thumb entry to f8
#------------------------------------------------------------------------------
a220: f7fe bf18 b\.w 9054 <f5\+0xc>
#------------------------------------------------------------------------------
#------ thumb entry to f8
#------------------------------------------------------------------------------
a224: f43e af16 beq\.w 9054 <f5\+0xc>
a228: 4c04 ldr r4, \[pc, #16\] ; \(a23c <_thumb\+0xf0>\)
a22a: f8df 4014 ldr\.w r4, \[pc, #20\] ; a240 <_thumb\+0xf4>
a22e: 4c05 ldr r4, \[pc, #20\] ; \(a244 <_thumb\+0xf8>\)
a230: 4c05 ldr r4, \[pc, #20\] ; \(a248 <_thumb\+0xfc>\)
a232: 4d06 ldr r5, \[pc, #24\] ; \(a24c <_thumb\+0x100>\)
a234: f249 0458 movw r4, #36952 ; 0x9058
a238: f2c0 0400 movt r4, #0
#------------------------------------------------------------------------------
#------ f8
#------------------------------------------------------------------------------
a23c: 00009058 \.word 0x00009058
#------------------------------------------------------------------------------
#------ PC-relative offset of f8
#------------------------------------------------------------------------------
a240: ffffee18 \.word 0xffffee18
#------------------------------------------------------------------------------
#------ GP-relative offset of f8
#------------------------------------------------------------------------------
a244: ffff8058 \.word 0xffff8058
#------------------------------------------------------------------------------
#------ .got offset for f8
#------------------------------------------------------------------------------
a248: 0000004c \.word 0x0000004c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f8
#------------------------------------------------------------------------------
a24c: 00006e00 \.word 0x00006e00

View File

@ -0,0 +1,48 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11000 00000000 00000000 00000000 00a00000 .*
#------------------------------------------------------------------------------
#------ 00011010: f2's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011014: f3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: f4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001101c: f7's .igot.plt pointer to 0xa018 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11010 05a00000 08a00000 0da00000 18a00000 .*
#------------------------------------------------------------------------------
#------ 00011020: f5's .igot.plt pointer to 0xa010 [R_ARM_IRELATIVE]
#------ 00011024: f8's .igot.plt pointer to 0xa01d [R_ARM_IRELATIVE]
#------ 00011028: f6's .igot.plt pointer to 0xa015 [R_ARM_IRELATIVE]
#------ 0001102c: .got entry for foo
#------------------------------------------------------------------------------
11020 10a00000 1da00000 15a00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011030: .got entry for f1's .iplt entry
#------ 00011034: .got entry for f2's .iplt entry
#------ 00011038: .got entry for f3's .iplt entry
#------ 0001103c: .got entry for f4's .iplt entry
#------------------------------------------------------------------------------
11030 00900000 0c900000 1c900000 2c900000 .*
#------------------------------------------------------------------------------
#------ 00011040: .got entry for foo
#------ 00011044: .got entry for f7
#------ 00011048: .got entry for f5
#------ 0001104c: .got entry for f8
#------------------------------------------------------------------------------
11040 00000100 3c900000 48900000 58900000 .*
#------------------------------------------------------------------------------
#------ 00011050: .got entry for f6
#------------------------------------------------------------------------------
11050 64900000 .*

View File

@ -0,0 +1,13 @@
There is no dynamic section in this file\.
Relocation section '\.rel\.dyn' at offset 0x8000 contains 8 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE
0001101c ......a0 R_ARM_IRELATIVE
00011020 ......a0 R_ARM_IRELATIVE
00011024 ......a0 R_ARM_IRELATIVE
00011028 ......a0 R_ARM_IRELATIVE

View File

@ -0,0 +1,74 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name,width
bl\width \name
b\width \name
beq\width \name
ldr r4,1f
ldr r4,2f
ldr r4,3f
ldr r4,4f
ldr r5,5f
movw r4,#:lower16:\name
movt r4,#:upper16:\name
1:
.word \name
2:
.word \name-.
3:
.word \name(GOTOFF)
4:
.word \name(GOT)
5:
.word \name(GOT_PREL)
.endm
define f1,.arm
define f2,.thumb_func
define f3,.arm
define f4,.thumb_func
.globl f5
.globl f6
.globl f7
.globl f8
define f5,.arm
define f6,.thumb_func
define f7,.arm
define f8,.thumb_func
.globl _start
.type _start,%function
.arm
_start:
test_relocs foo
test_relocs f1,
test_relocs f2,
test_relocs f5,
test_relocs f6,
.size _start,.-_start
.globl _thumb
.type _thumb,%function
.thumb_func
_thumb:
test_relocs foo
test_relocs f3,.w
test_relocs f4,.w
test_relocs f7,.w
test_relocs f8,.w
.size _thumb,.-_thumb
.data
foo:
.word 0x11223344

View File

@ -0,0 +1,126 @@
.*
Disassembly of section \.plt:
00009000 <\.plt>:
9000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
9004: e59fe004 ldr lr, \[pc, #4\] ; 9010 <f1-0xff0>
9008: e08fe00e add lr, pc, lr
900c: e5bef008 ldr pc, \[lr, #8\]!
#------------------------------------------------------------------------------
#------ PC-relative offset of .got.plt
#------------------------------------------------------------------------------
9010: 00007ff0 \.word 0x00007ff0
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
9014: e28fc600 add ip, pc, #0
9018: e28cca07 add ip, ip, #28672 ; 0x7000
901c: e5bcfff0 ldr pc, \[ip, #4080\]! ; 0xff0
Disassembly of section \.iplt:
00009020 <\.iplt>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
9020: e28fc600 add ip, pc, #0
9024: e28cca07 add ip, ip, #28672 ; 0x7000
9028: e5bcffe8 ldr pc, \[ip, #4072\]! ; 0xfe8
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe0 ldr pc, \[ip, #4064\]! ; 0xfe0
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
9038: e28fc600 add ip, pc, #0
903c: e28cca07 add ip, ip, #28672 ; 0x7000
9040: e5bcffd8 ldr pc, \[ip, #4056\]! ; 0xfd8
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f2>:
a004: e1a0f00e mov pc, lr
0000a008 <f3>:
a008: e1a0f00e mov pc, lr
0000a00c <f4>:
a00c: e1a0f00e mov pc, lr
0000a010 <arm>:
a010: eb0017fa bl 10000 <foo>
a014: e59f4000 ldr r4, \[pc, #0\] ; a01c <arm\+0xc>
a018: e59f4000 ldr r4, \[pc, #0\] ; a020 <arm\+0x10>
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a01c: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a020: 00006ffc \.word 0x00006ffc
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a024: ebfffbfd bl 9020 <f1-0xfe0>
a028: e59f4000 ldr r4, \[pc, #0\] ; a030 <arm\+0x20>
a02c: e59f4000 ldr r4, \[pc, #0\] ; a034 <arm\+0x24>
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a030: 00000010 \.word 0x00000010
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a034: 00006fdc \.word 0x00006fdc
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
a038: ebfffbf5 bl 9014 <f1-0xfec>
a03c: e59f4000 ldr r4, \[pc, #0\] ; a044 <arm\+0x34>
a040: e59f4000 ldr r4, \[pc, #0\] ; a048 <arm\+0x38>
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a044: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a048: 00006fdc \.word 0x00006fdc
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
a04c: ebfffbf6 bl 902c <f1-0xfd4>
a050: e59f4000 ldr r4, \[pc, #0\] ; a058 <arm\+0x48>
a054: e59f4000 ldr r4, \[pc, #0\] ; a05c <arm\+0x4c>
#------------------------------------------------------------------------------
#------ GP-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a058: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a05c: 00006fb8 \.word 0x00006fb8
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
a060: ebfffbf4 bl 9038 <f1-0xfc8>
a064: e59f4000 ldr r4, \[pc, #0\] ; a06c <arm\+0x5c>
a068: e59f4000 ldr r4, \[pc, #0\] ; a070 <arm\+0x60>
#------------------------------------------------------------------------------
#------ .got offset for f4
#------------------------------------------------------------------------------
a06c: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f4
#------------------------------------------------------------------------------
a070: 00006fb8 \.word 0x00006fb8

View File

@ -0,0 +1,45 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------ 00010004: contains foo [R_ARM_RELATIVE]
#------ 00010008: contains PC-relative offset of foo
#------ 0001000c: contains f1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10000 44332211 00000100 f8ffffff 00a00000 .*
#------------------------------------------------------------------------------
#------ 00010010: contains PC-relative offset of f1's .iplt entry
#------ 00010014: f2 [R_ARM_ABS32]
#------ 00010018: f2 [R_ARM_REL32]
#------ 0001001c: contains f3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10010 1090ffff 00000000 00000000 08a00000 .*
#------------------------------------------------------------------------------
#------ 00010020: contains PC-relative offset of f3's .iplt entry
#------ 00010024: f4 [R_ARM_ABS32]
#------ 00010028: contains PC-relative offset of f4's .iplt entry
#------------------------------------------------------------------------------
10020 0c90ffff 00000000 1090ffff .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011014: f3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: f4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001101c: .got entry for foo [R_ARM_RELATIVE]
#------------------------------------------------------------------------------
11010 00a00000 08a00000 0ca00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for foo [R_ARM_RELATIVE]
#------ 00011024: .got entry for f2 [R_ARM_GLOB_DAT]
#------ 00011028: .got entry for f4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11020 00000100 00000000 00000000 .*

View File

@ -0,0 +1,20 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 13 entries:
Offset Info Type Sym\.Value Sym\. Name
00010004 ......17 R_ARM_RELATIVE
0001101c ......17 R_ARM_RELATIVE
00011020 ......17 R_ARM_RELATIVE
0001000c ......a0 R_ARM_IRELATIVE
0001001c ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE
00010014 ......02 R_ARM_ABS32 f2\(\) f2
00010018 ......03 R_ARM_REL32 f2\(\) f2
00011024 ......15 R_ARM_GLOB_DAT f2\(\) f2
00010024 ......02 R_ARM_ABS32 f4\(\) f4
00011028 ......15 R_ARM_GLOB_DAT f4\(\) f4
Relocation section '\.rel\.plt' at offset 0x8068 contains 1 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT f2\(\) f2

View File

@ -0,0 +1,49 @@
.macro define,name
.text
.type \name,%gnu_indirect_function
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
bl \name(PLT)
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.data
.word \name
.word \name - .
.text
.endm
.globl f2
.globl f3
.hidden f3
.globl f4
.protected f4
define f1
define f2
define f3
define f4
.data
foo:
.word 0x11223344
.text
.globl arm
arm:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f4
.size arm,.-arm

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,167 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------ 00010004: contains aaf1 [R_ARM_IRELATIVE]
#------ 00010008: contains PC-relative offset of aaf1's .iplt entry
#------ 0001000c: contains atf1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10000 44332211 00a00000 6490ffff 04a00000 .*
#------------------------------------------------------------------------------
#------ 00010010: contains PC-relative offset of atf1's .iplt entry
#------ 00010014: contains abf1 [R_ARM_IRELATIVE]
#------ 00010018: contains PC-relative offset of abf1's .iplt entry
#------ 0001001c: contains taf1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10010 6c90ffff 08a00000 7490ffff 0da00000 .*
#------------------------------------------------------------------------------
#------ 00010020: contains PC-relative offset of taf1's .iplt entry
#------ 00010024: contains ttf1 [R_ARM_IRELATIVE]
#------ 00010028: contains PC-relative offset of ttf1's .iplt entry
#------ 0001002c: contains tbf1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10020 7890ffff 0fa00000 8090ffff 11a00000 .*
#------------------------------------------------------------------------------
#------ 00010030: contains PC-relative offset of tbf1's .iplt entry
#------ 00010034: aaf2 [R_ARM_ABS32]
#------ 00010038: aaf2 [R_ARM_REL32]
#------ 0001003c: atf2 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10030 8890ffff 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00010040: atf2 [R_ARM_REL32]
#------ 00010044: abf2 [R_ARM_ABS32]
#------ 00010048: abf2 [R_ARM_REL32]
#------ 0001004c: taf2 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10040 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00010050: taf2 [R_ARM_REL32]
#------ 00010054: ttf2 [R_ARM_ABS32]
#------ 00010058: ttf2 [R_ARM_REL32]
#------ 0001005c: tbf2 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10050 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00010060: tbf2 [R_ARM_REL32]
#------ 00010064: contains aaf3 [R_ARM_IRELATIVE]
#------ 00010068: contains PC-relative offset of aaf3's .iplt entry
#------ 0001006c: contains atf3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10060 00000000 28a00000 e490ffff 2ca00000 .*
#------------------------------------------------------------------------------
#------ 00010070: contains PC-relative offset of atf3's .iplt entry
#------ 00010074: contains abf3 [R_ARM_IRELATIVE]
#------ 00010078: contains PC-relative offset of abf3's .iplt entry
#------ 0001007c: contains taf3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10070 6490ffff 30a00000 6c90ffff 35a00000 .*
#------------------------------------------------------------------------------
#------ 00010080: contains PC-relative offset of taf3's .iplt entry
#------ 00010084: contains ttf3 [R_ARM_IRELATIVE]
#------ 00010088: contains PC-relative offset of ttf3's .iplt entry
#------ 0001008c: contains tbf3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10080 9090ffff 37a00000 6c90ffff 39a00000 .*
#------------------------------------------------------------------------------
#------ 00010090: contains PC-relative offset of tbf3's .iplt entry
#------ 00010094: aaf4 [R_ARM_ABS32]
#------ 00010098: contains PC-relative offset of aaf4's .iplt entry
#------ 0001009c: atf4 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10090 7490ffff 00000000 2c90ffff 00000000 .*
#------------------------------------------------------------------------------
#------ 000100a0: contains PC-relative offset of atf4's .iplt entry
#------ 000100a4: abf4 [R_ARM_ABS32]
#------ 000100a8: contains PC-relative offset of abf4's .iplt entry
#------ 000100ac: taf4 [R_ARM_ABS32]
#------------------------------------------------------------------------------
100a0 bc90ffff 00000000 7890ffff 00000000 .*
#------------------------------------------------------------------------------
#------ 000100b0: contains PC-relative offset of taf4's .iplt entry
#------ 000100b4: ttf4 [R_ARM_ABS32]
#------ 000100b8: contains PC-relative offset of ttf4's .iplt entry
#------ 000100bc: tbf4 [R_ARM_ABS32]
#------------------------------------------------------------------------------
100b0 b890ffff 00000000 8890ffff 00000000 .*
#------------------------------------------------------------------------------
#------ 000100c0: contains PC-relative offset of tbf4's .iplt entry
#------------------------------------------------------------------------------
100c0 7090ffff .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: atf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: ttf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011014: tbf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011018: taf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001101c: aaf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11010 00900000 00900000 00900000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011020: abf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011024: aaf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011028: atf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001102c: abf1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11020 00900000 00a00000 04a00000 08a00000 .*
#------------------------------------------------------------------------------
#------ 00011030: taf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011034: ttf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011038: tbf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001103c: aaf4's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11030 0da00000 0fa00000 11a00000 3ca00000 .*
#------------------------------------------------------------------------------
#------ 00011040: atf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011044: abf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011048: ttf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001104c: tbf3's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11040 2ca00000 30a00000 37a00000 39a00000 .*
#------------------------------------------------------------------------------
#------ 00011050: taf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011054: abf4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011058: tbf4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001105c: ttf4's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11050 35a00000 44a00000 4da00000 4ba00000 .*
#------------------------------------------------------------------------------
#------ 00011060: aaf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011064: atf4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011068: taf4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001106c: .got entry for foo [R_ARM_RELATIVE]
#------------------------------------------------------------------------------
11060 28a00000 40a00000 49a00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011070: .got entry for foo [R_ARM_RELATIVE]
#------ 00011074: .got entry for atf2 [R_ARM_GLOB_DAT]
#------ 00011078: .got entry for aaf4 [R_ARM_GLOB_DAT]
#------ 0001107c: .got entry for ttf2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11070 00000100 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00011080: .got entry for tbf2 [R_ARM_GLOB_DAT]
#------ 00011084: .got entry for taf2 [R_ARM_GLOB_DAT]
#------ 00011088: .got entry for aaf2 [R_ARM_GLOB_DAT]
#------ 0001108c: .got entry for abf4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11080 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00011090: .got entry for tbf4 [R_ARM_GLOB_DAT]
#------ 00011094: .got entry for ttf4 [R_ARM_GLOB_DAT]
#------ 00011098: .got entry for atf4 [R_ARM_GLOB_DAT]
#------ 0001109c: .got entry for taf4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11090 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000110a0: .got entry for abf2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
110a0 00000000 .*

View File

@ -0,0 +1,74 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 62 entries:
Offset Info Type Sym\.Value Sym\. Name
0001106c ......17 R_ARM_RELATIVE
00011070 ......17 R_ARM_RELATIVE
00010004 ......a0 R_ARM_IRELATIVE
0001000c ......a0 R_ARM_IRELATIVE
00010014 ......a0 R_ARM_IRELATIVE
0001001c ......a0 R_ARM_IRELATIVE
00010024 ......a0 R_ARM_IRELATIVE
0001002c ......a0 R_ARM_IRELATIVE
00010064 ......a0 R_ARM_IRELATIVE
0001006c ......a0 R_ARM_IRELATIVE
00010074 ......a0 R_ARM_IRELATIVE
0001007c ......a0 R_ARM_IRELATIVE
00010084 ......a0 R_ARM_IRELATIVE
0001008c ......a0 R_ARM_IRELATIVE
00011024 ......a0 R_ARM_IRELATIVE
00011028 ......a0 R_ARM_IRELATIVE
0001102c ......a0 R_ARM_IRELATIVE
00011030 ......a0 R_ARM_IRELATIVE
00011034 ......a0 R_ARM_IRELATIVE
00011038 ......a0 R_ARM_IRELATIVE
0001103c ......a0 R_ARM_IRELATIVE
00011040 ......a0 R_ARM_IRELATIVE
00011044 ......a0 R_ARM_IRELATIVE
00011048 ......a0 R_ARM_IRELATIVE
0001104c ......a0 R_ARM_IRELATIVE
00011050 ......a0 R_ARM_IRELATIVE
00011054 ......a0 R_ARM_IRELATIVE
00011058 ......a0 R_ARM_IRELATIVE
0001105c ......a0 R_ARM_IRELATIVE
00011060 ......a0 R_ARM_IRELATIVE
00011064 ......a0 R_ARM_IRELATIVE
00011068 ......a0 R_ARM_IRELATIVE
00010034 ......02 R_ARM_ABS32 aaf2\(\) aaf2
00010038 ......03 R_ARM_REL32 aaf2\(\) aaf2
00011088 ......15 R_ARM_GLOB_DAT aaf2\(\) aaf2
0001003c ......02 R_ARM_ABS32 atf2\(\) atf2
00010040 ......03 R_ARM_REL32 atf2\(\) atf2
00011074 ......15 R_ARM_GLOB_DAT atf2\(\) atf2
00010044 ......02 R_ARM_ABS32 abf2\(\) abf2
00010048 ......03 R_ARM_REL32 abf2\(\) abf2
000110a0 ......15 R_ARM_GLOB_DAT abf2\(\) abf2
0001004c ......02 R_ARM_ABS32 taf2\(\) taf2
00010050 ......03 R_ARM_REL32 taf2\(\) taf2
00011084 ......15 R_ARM_GLOB_DAT taf2\(\) taf2
00010054 ......02 R_ARM_ABS32 ttf2\(\) ttf2
00010058 ......03 R_ARM_REL32 ttf2\(\) ttf2
0001107c ......15 R_ARM_GLOB_DAT ttf2\(\) ttf2
0001005c ......02 R_ARM_ABS32 tbf2\(\) tbf2
00010060 ......03 R_ARM_REL32 tbf2\(\) tbf2
00011080 ......15 R_ARM_GLOB_DAT tbf2\(\) tbf2
00010094 ......02 R_ARM_ABS32 aaf4\(\) aaf4
00011078 ......15 R_ARM_GLOB_DAT aaf4\(\) aaf4
0001009c ......02 R_ARM_ABS32 atf4\(\) atf4
00011098 ......15 R_ARM_GLOB_DAT atf4\(\) atf4
000100a4 ......02 R_ARM_ABS32 abf4\(\) abf4
0001108c ......15 R_ARM_GLOB_DAT abf4\(\) abf4
000100ac ......02 R_ARM_ABS32 taf4\(\) taf4
0001109c ......15 R_ARM_GLOB_DAT taf4\(\) taf4
000100b4 ......02 R_ARM_ABS32 ttf4\(\) ttf4
00011094 ......15 R_ARM_GLOB_DAT ttf4\(\) ttf4
000100bc ......02 R_ARM_ABS32 tbf4\(\) tbf4
00011090 ......15 R_ARM_GLOB_DAT tbf4\(\) tbf4
Relocation section '\.rel\.plt' at offset 0x81f0 contains 6 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT atf2\(\) atf2
00011010 ......16 R_ARM_JUMP_SLOT ttf2\(\) ttf2
00011014 ......16 R_ARM_JUMP_SLOT tbf2\(\) tbf2
00011018 ......16 R_ARM_JUMP_SLOT taf2\(\) taf2
0001101c ......16 R_ARM_JUMP_SLOT aaf2\(\) aaf2
00011020 ......16 R_ARM_JUMP_SLOT abf2\(\) abf2

View File

@ -0,0 +1,95 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro define2,name
define aa\name,.arm
define at\name,.arm
define ab\name,.arm
define ta\name,.thumb_func
define tt\name,.thumb_func
define tb\name,.thumb_func
.endm
.macro test_relocs,name,width
bl \name(PLT)
b\width \name
beq\width \name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.macro test_relocs2,name,type,width
test_relocs a\type\name,\width
test_relocs t\type\name,\width
test_relocs ab\name,\width
test_relocs tb\name,\width
.endm
.macro diff,name
.word \name
.word \name-.
.endm
.macro alldirs,doit,name
\doit aa\name
\doit at\name
\doit ab\name
\doit ta\name
\doit tt\name
\doit tb\name
.endm
define2 f1
define2 f2
define2 f3
define2 f4
alldirs .globl,f2
alldirs .globl,f3
alldirs .hidden,f3
alldirs .globl,f4
alldirs .protected,f4
.globl arm
.type arm,%function
.arm
arm:
test_relocs foo
test_relocs2 f1,a,
test_relocs2 f2,a,
test_relocs2 f3,a,
test_relocs2 f4,a,
.size arm,.-arm
.globl _thumb
.type _thumb,%function
.thumb_func
_thumb:
test_relocs foo
test_relocs2 f1,t,.w
test_relocs2 f2,t,.w
test_relocs2 f3,t,.w
test_relocs2 f4,t,.w
.size _thumb,.-_thumb
.data
foo:
.word 0x11223344
alldirs diff,f1
alldirs diff,f2
alldirs diff,f3
alldirs diff,f4

View File

@ -0,0 +1,91 @@
.*
Disassembly of section \.iplt:
00009000 <\.iplt>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
9000: e28fc600 add ip, pc, #0
9004: e28cca08 add ip, ip, #32768 ; 0x8000
9008: e5bcf004 ldr pc, \[ip, #4\]!
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
900c: e28fc600 add ip, pc, #0
9010: e28cca07 add ip, ip, #28672 ; 0x7000
9014: e5bcfffc ldr pc, \[ip, #4092\]! ; 0xffc
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
9018: e28fc600 add ip, pc, #0
901c: e28cca07 add ip, ip, #28672 ; 0x7000
9020: e5bcfff4 ldr pc, \[ip, #4084\]! ; 0xff4
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f2>:
a004: e1a0f00e mov pc, lr
0000a008 <f3>:
a008: e1a0f00e mov pc, lr
0000a00c <_start>:
a00c: eb0017fb bl 10000 <foo>
a010: e59f4000 ldr r4, \[pc, #0\] ; a018 <_start\+0xc>
a014: e59f4000 ldr r4, \[pc, #0\] ; a01c <_start\+0x10>
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a018: 0000001c \.word 0x0000001c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a01c: 00006ffc \.word 0x00006ffc
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a020: ebfffbf6 bl 9000 <__irel_end\+0xfe8>
a024: e59f4000 ldr r4, \[pc, #0\] ; a02c <_start\+0x20>
a028: e59f4000 ldr r4, \[pc, #0\] ; a030 <_start\+0x24>
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a02c: 0000000c \.word 0x0000000c
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a030: 00006fdc \.word 0x00006fdc
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a034: ebfffbf7 bl 9018 <__irel_end\+0x1000>
a038: e59f4000 ldr r4, \[pc, #0\] ; a040 <_start\+0x34>
a03c: e59f4000 ldr r4, \[pc, #0\] ; a044 <_start\+0x38>
#------------------------------------------------------------------------------
#------ GP-relative offset of f2's .igot.plt entry
#------------------------------------------------------------------------------
a040: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of f2's .igot.plt entry
#------------------------------------------------------------------------------
a044: 00006fd0 \.word 0x00006fd0
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
a048: ebfffbef bl 900c <__irel_end\+0xff4>
a04c: e59f4000 ldr r4, \[pc, #0\] ; a054 <_start\+0x48>
a050: e59f4000 ldr r4, \[pc, #0\] ; a058 <_start\+0x4c>
#------------------------------------------------------------------------------
#------ GP-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a054: 00000010 \.word 0x00000010
#------------------------------------------------------------------------------
#------ PC-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a058: 00006fb8 \.word 0x00006fb8

View File

@ -0,0 +1,23 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 18800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11000 00000000 00000000 00000000 00a00000 .*
#------------------------------------------------------------------------------
#------ 00011010: f3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011014: f2's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: .got entry for foo
#------ 0001101c: .got entry for foo
#------------------------------------------------------------------------------
11010 08a00000 04a00000 00000100 00000100 .*

View File

@ -0,0 +1,8 @@
There is no dynamic section in this file\.
Relocation section '\.rel\.dyn' at offset 0x8000 contains 3 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE

View File

@ -0,0 +1,39 @@
.macro define,name
.type \name,%gnu_indirect_function
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
bl \name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.global f2
.global f3
.hidden f3
define f1
define f2
define f3
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
.size _start,.-_start
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,175 @@
.*
Disassembly of section \.iplt:
00009000 <\.iplt>:
#------------------------------------------------------------------------------
#------ thumb entry to f3's .iplt entry
#------------------------------------------------------------------------------
9000: 4778 bx pc
9002: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
9004: e28fc600 add ip, pc, #0
9008: e28cca08 add ip, ip, #32768 ; 0x8000
900c: e5bcf000 ldr pc, \[ip\]!
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
9010: e28fc600 add ip, pc, #0
9014: e28cca07 add ip, ip, #28672 ; 0x7000
9018: e5bcfff8 ldr pc, \[ip, #4088\]! ; 0xff8
#------------------------------------------------------------------------------
#------ thumb entry to f4's .iplt entry
#------------------------------------------------------------------------------
901c: 4778 bx pc
901e: 46c0 nop ; \(mov r8, r8\)
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
9020: e28fc600 add ip, pc, #0
9024: e28cca07 add ip, ip, #28672 ; 0x7000
9028: e5bcffec ldr pc, \[ip, #4076\]! ; 0xfec
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe4 ldr pc, \[ip, #4068\]! ; 0xfe4
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f2>:
a004: 46f7 mov pc, lr
\.\.\.
0000a008 <f3>:
a008: e1a0f00e mov pc, lr
0000a00c <f4>:
a00c: 46f7 mov pc, lr
\.\.\.
0000a010 <_start>:
a010: eb0017fa bl 10000 <foo>
a014: ea0017f9 b 10000 <foo>
a018: 0a0017f8 beq 10000 <foo>
a01c: e59f4000 ldr r4, \[pc, #0\] ; a024 <_start\+0x14>
a020: e59f4000 ldr r4, \[pc, #0\] ; a028 <_start\+0x18>
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a024: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a028: 00006ff4 \.word 0x00006ff4
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a02c: ebfffbfe bl 902c <__irel_end\+0x100c>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a030: eafffbfd b 902c <__irel_end\+0x100c>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a034: 0afffbfc beq 902c <__irel_end\+0x100c>
a038: e59f4000 ldr r4, \[pc, #0\] ; a040 <_start\+0x30>
a03c: e59f4000 ldr r4, \[pc, #0\] ; a044 <_start\+0x34>
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a040: 00000018 \.word 0x00000018
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a044: 00006fd4 \.word 0x00006fd4
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a048: ebfffbf0 bl 9010 <__irel_end\+0xff0>
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a04c: eafffbef b 9010 <__irel_end\+0xff0>
#------------------------------------------------------------------------------
#------ f2's .iplt entry
#------------------------------------------------------------------------------
a050: 0afffbee beq 9010 <__irel_end\+0xff0>
a054: e59f4000 ldr r4, \[pc, #0\] ; a05c <_start\+0x4c>
a058: e59f4000 ldr r4, \[pc, #0\] ; a060 <_start\+0x50>
#------------------------------------------------------------------------------
#------ GP-relative offset of f2's .igot.plt entry
#------------------------------------------------------------------------------
a05c: 00000010 \.word 0x00000010
#------------------------------------------------------------------------------
#------ PC-relative offset of f2's .igot.plt entry
#------------------------------------------------------------------------------
a060: 00006fb0 \.word 0x00006fb0
0000a064 <_thumb>:
a064: f005 ffcc bl 10000 <foo>
a068: f005 bfca b\.w 10000 <foo>
a06c: f005 87c8 beq\.w 10000 <foo>
a070: 4c00 ldr r4, \[pc, #0\] ; \(a074 <_thumb\+0x10>\)
a072: 4c01 ldr r4, \[pc, #4\] ; \(a078 <_thumb\+0x14>\)
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a074: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a078: 00006fa4 \.word 0x00006fa4
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
a07c: f7fe efc2 blx 9004 <__irel_end\+0xfe4>
#------------------------------------------------------------------------------
#------ thumb entry to f3's .iplt entry
#------------------------------------------------------------------------------
a080: f7fe bfbe b\.w 9000 <__irel_end\+0xfe0>
#------------------------------------------------------------------------------
#------ thumb entry to f3's .iplt entry
#------------------------------------------------------------------------------
a084: f43e afbc beq\.w 9000 <__irel_end\+0xfe0>
a088: 4c00 ldr r4, \[pc, #0\] ; \(a08c <_thumb\+0x28>\)
a08a: 4c01 ldr r4, \[pc, #4\] ; \(a090 <_thumb\+0x2c>\)
#------------------------------------------------------------------------------
#------ GP-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a08c: 0000000c \.word 0x0000000c
#------------------------------------------------------------------------------
#------ PC-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a090: 00006f7c \.word 0x00006f7c
#------------------------------------------------------------------------------
#------ f4's .iplt entry
#------------------------------------------------------------------------------
a094: f7fe efc4 blx 9020 <__irel_end\+0x1000>
#------------------------------------------------------------------------------
#------ thumb entry to f4's .iplt entry
#------------------------------------------------------------------------------
a098: f7fe bfc0 b\.w 901c <__irel_end\+0xffc>
#------------------------------------------------------------------------------
#------ thumb entry to f4's .iplt entry
#------------------------------------------------------------------------------
a09c: f43e afbe beq\.w 901c <__irel_end\+0xffc>
a0a0: 4c00 ldr r4, \[pc, #0\] ; \(a0a4 <_thumb\+0x40>\)
a0a2: 4c01 ldr r4, \[pc, #4\] ; \(a0a8 <_thumb\+0x44>\)
#------------------------------------------------------------------------------
#------ GP-relative offset of f4's .igot.plt entry
#------------------------------------------------------------------------------
a0a4: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of f4's .igot.plt entry
#------------------------------------------------------------------------------
a0a8: 00006f6c \.word 0x00006f6c

View File

@ -0,0 +1,27 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 00800000 20800000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f3's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11000 00000000 00000000 00000000 08a00000 .*
#------------------------------------------------------------------------------
#------ 00011010: f2's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011014: f4's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001101c: .got entry for foo
#------------------------------------------------------------------------------
11010 05a00000 0da00000 00a00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for foo
#------------------------------------------------------------------------------
11020 00000100 .*

View File

@ -0,0 +1,9 @@
There is no dynamic section in this file\.
Relocation section '\.rel\.dyn' at offset 0x8000 contains 4 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......a0 R_ARM_IRELATIVE
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE

View File

@ -0,0 +1,59 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name,width
bl\width \name
b\width \name
beq\width \name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.global f1
.global f2
.global f3
.global f4
.hidden f3
.hidden f4
define f1,.arm
define f2,.thumb_func
define f3,.arm
define f4,.thumb_func
.globl _start
.type _start,%function
.arm
_start:
test_relocs foo
test_relocs f1,
test_relocs f2,
.size _start,.-_start
.globl _thumb
.type _thumb,%function
.thumb_func
_thumb:
test_relocs foo
test_relocs f3,.w
test_relocs f4,.w
.size _thumb,.-_thumb
.data
foo:
.word 0x11223344
.word __irel_start
.word __irel_end

View File

@ -0,0 +1,120 @@
.*
Disassembly of section \.plt:
00009000 <\.plt>:
9000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
9004: e59fe004 ldr lr, \[pc, #4\] ; 9010 <f1-0xff0>
9008: e08fe00e add lr, pc, lr
900c: e5bef008 ldr pc, \[lr, #8\]!
#------------------------------------------------------------------------------
#------ PC-relative offset of .got.plt
#------------------------------------------------------------------------------
9010: 00007ff0 \.word 0x00007ff0
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
9014: e28fc600 add ip, pc, #0
9018: e28cca07 add ip, ip, #28672 ; 0x7000
901c: e5bcfff0 ldr pc, \[ip, #4080\]! ; 0xff0
#------------------------------------------------------------------------------
#------ f4's .plt entry
#------------------------------------------------------------------------------
9020: e28fc600 add ip, pc, #0
9024: e28cca07 add ip, ip, #28672 ; 0x7000
9028: e5bcffe8 ldr pc, \[ip, #4072\]! ; 0xfe8
Disassembly of section \.iplt:
0000902c <\.iplt>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe0 ldr pc, \[ip, #4064\]! ; 0xfe0
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
9038: e28fc600 add ip, pc, #0
903c: e28cca07 add ip, ip, #28672 ; 0x7000
9040: e5bcffd8 ldr pc, \[ip, #4056\]! ; 0xfd8
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
0000a004 <f3>:
a004: e1a0f00e mov pc, lr
0000a008 <arm>:
a008: eb0017fc bl 10000 <foo>
a00c: e59f4000 ldr r4, \[pc, #0\] ; a014 <arm\+0xc>
a010: e59f4000 ldr r4, \[pc, #0\] ; a018 <arm\+0x10>
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a014: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a018: 00007004 \.word 0x00007004
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a01c: ebfffc02 bl 902c <f1-0xfd4>
a020: e59f4000 ldr r4, \[pc, #0\] ; a028 <arm\+0x20>
a024: e59f4000 ldr r4, \[pc, #0\] ; a02c <arm\+0x24>
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a028: 00000014 \.word 0x00000014
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .igot.plt entry
#------------------------------------------------------------------------------
a02c: 00006fe8 \.word 0x00006fe8
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
a030: ebfffbf7 bl 9014 <f1-0xfec>
a034: e59f4000 ldr r4, \[pc, #0\] ; a03c <arm\+0x34>
a038: e59f4000 ldr r4, \[pc, #0\] ; a040 <arm\+0x38>
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a03c: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a040: 00006fe4 \.word 0x00006fe4
#------------------------------------------------------------------------------
#------ f3's .iplt entry
#------------------------------------------------------------------------------
a044: ebfffbfb bl 9038 <f1-0xfc8>
a048: e59f4000 ldr r4, \[pc, #0\] ; a050 <arm\+0x48>
a04c: e59f4000 ldr r4, \[pc, #0\] ; a054 <arm\+0x4c>
#------------------------------------------------------------------------------
#------ GP-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a050: 00000018 \.word 0x00000018
#------------------------------------------------------------------------------
#------ PC-relative offset of f3's .igot.plt entry
#------------------------------------------------------------------------------
a054: 00006fc4 \.word 0x00006fc4
#------------------------------------------------------------------------------
#------ f4's .plt entry
#------------------------------------------------------------------------------
a058: ebfffbf0 bl 9020 <f1-0xfe0>
a05c: e59f4000 ldr r4, \[pc, #0\] ; a064 <arm\+0x5c>
a060: e59f4000 ldr r4, \[pc, #0\] ; a068 <arm\+0x60>
#------------------------------------------------------------------------------
#------ .got offset for f4
#------------------------------------------------------------------------------
a064: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f4
#------------------------------------------------------------------------------
a068: 00006fc0 \.word 0x00006fc0

View File

@ -0,0 +1,45 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------ 00010004: contains foo [R_ARM_RELATIVE]
#------ 00010008: contains PC-relative offset of foo
#------ 0001000c: contains f1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10000 44332211 00000100 f8ffffff 00a00000 .*
#------------------------------------------------------------------------------
#------ 00010010: contains PC-relative offset of f1's .iplt entry
#------ 00010014: f2 [R_ARM_ABS32]
#------ 00010018: f2 [R_ARM_REL32]
#------ 0001001c: contains f3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10010 1c90ffff 00000000 00000000 04a00000 .*
#------------------------------------------------------------------------------
#------ 00010020: contains PC-relative offset of f3's .iplt entry
#------ 00010024: f4 [R_ARM_ABS32]
#------ 00010028: f4 [R_ARM_REL32]
#------------------------------------------------------------------------------
10020 1890ffff 00000000 00000000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: f4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011014: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011018: f3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001101c: .got entry for foo [R_ARM_RELATIVE]
#------------------------------------------------------------------------------
11010 00900000 00a00000 04a00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for foo [R_ARM_RELATIVE]
#------ 00011024: .got entry for f2 [R_ARM_GLOB_DAT]
#------ 00011028: .got entry for f4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11020 00000100 00000000 00000000 .*

View File

@ -0,0 +1,21 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 13 entries:
Offset Info Type Sym\.Value Sym\. Name
00010004 ......17 R_ARM_RELATIVE
0001101c ......17 R_ARM_RELATIVE
00011020 ......17 R_ARM_RELATIVE
0001000c ......a0 R_ARM_IRELATIVE
0001001c ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011018 ......a0 R_ARM_IRELATIVE
00010014 ......02 R_ARM_ABS32 00000000 f2
00010018 ......03 R_ARM_REL32 00000000 f2
00011024 ......15 R_ARM_GLOB_DAT 00000000 f2
00010024 ......02 R_ARM_ABS32 00000000 f4
00010028 ......03 R_ARM_REL32 00000000 f4
00011028 ......15 R_ARM_GLOB_DAT 00000000 f4
Relocation section '\.rel\.plt' at offset 0x8068 contains 2 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT 00000000 f2
00011010 ......16 R_ARM_JUMP_SLOT 00000000 f4

View File

@ -0,0 +1,42 @@
.macro define,name
.text
.type \name,%gnu_indirect_function
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
bl \name(PLT)
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.data
.word \name
.word \name - .
.text
.endm
.globl f3
.hidden f3
define f1
define f3
.data
foo:
.word 0x11223344
.text
.globl arm
arm:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
test_relocs f4
.size arm,.-arm

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,167 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------ 00010004: contains aaf1 [R_ARM_IRELATIVE]
#------ 00010008: contains PC-relative offset of aaf1's .iplt entry
#------ 0001000c: contains atf1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10000 44332211 00a00000 bc90ffff 04a00000 .*
#------------------------------------------------------------------------------
#------ 00010010: contains PC-relative offset of atf1's .iplt entry
#------ 00010014: contains abf1 [R_ARM_IRELATIVE]
#------ 00010018: contains PC-relative offset of abf1's .iplt entry
#------ 0001001c: contains taf1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10010 c490ffff 08a00000 cc90ffff 0da00000 .*
#------------------------------------------------------------------------------
#------ 00010020: contains PC-relative offset of taf1's .iplt entry
#------ 00010024: contains ttf1 [R_ARM_IRELATIVE]
#------ 00010028: contains PC-relative offset of ttf1's .iplt entry
#------ 0001002c: contains tbf1 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10020 d090ffff 0fa00000 d890ffff 11a00000 .*
#------------------------------------------------------------------------------
#------ 00010030: contains PC-relative offset of tbf1's .iplt entry
#------ 00010034: aaf2 [R_ARM_ABS32]
#------ 00010038: aaf2 [R_ARM_REL32]
#------ 0001003c: atf2 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10030 e090ffff 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00010040: atf2 [R_ARM_REL32]
#------ 00010044: abf2 [R_ARM_ABS32]
#------ 00010048: abf2 [R_ARM_REL32]
#------ 0001004c: taf2 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10040 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00010050: taf2 [R_ARM_REL32]
#------ 00010054: ttf2 [R_ARM_ABS32]
#------ 00010058: ttf2 [R_ARM_REL32]
#------ 0001005c: tbf2 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10050 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00010060: tbf2 [R_ARM_REL32]
#------ 00010064: contains aaf3 [R_ARM_IRELATIVE]
#------ 00010068: contains PC-relative offset of aaf3's .iplt entry
#------ 0001006c: contains atf3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10060 00000000 14a00000 0091ffff 18a00000 .*
#------------------------------------------------------------------------------
#------ 00010070: contains PC-relative offset of atf3's .iplt entry
#------ 00010074: contains abf3 [R_ARM_IRELATIVE]
#------ 00010078: contains PC-relative offset of abf3's .iplt entry
#------ 0001007c: contains taf3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10070 b090ffff 1ca00000 b890ffff 21a00000 .*
#------------------------------------------------------------------------------
#------ 00010080: contains PC-relative offset of taf3's .iplt entry
#------ 00010084: contains ttf3 [R_ARM_IRELATIVE]
#------ 00010088: contains PC-relative offset of ttf3's .iplt entry
#------ 0001008c: contains tbf3 [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
10080 dc90ffff 23a00000 b890ffff 25a00000 .*
#------------------------------------------------------------------------------
#------ 00010090: contains PC-relative offset of tbf3's .iplt entry
#------ 00010094: aaf4 [R_ARM_ABS32]
#------ 00010098: aaf4 [R_ARM_REL32]
#------ 0001009c: atf4 [R_ARM_ABS32]
#------------------------------------------------------------------------------
10090 c090ffff 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000100a0: atf4 [R_ARM_REL32]
#------ 000100a4: abf4 [R_ARM_ABS32]
#------ 000100a8: abf4 [R_ARM_REL32]
#------ 000100ac: taf4 [R_ARM_ABS32]
#------------------------------------------------------------------------------
100a0 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000100b0: taf4 [R_ARM_REL32]
#------ 000100b4: ttf4 [R_ARM_ABS32]
#------ 000100b8: ttf4 [R_ARM_REL32]
#------ 000100bc: tbf4 [R_ARM_ABS32]
#------------------------------------------------------------------------------
100b0 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000100c0: tbf4 [R_ARM_REL32]
#------------------------------------------------------------------------------
100c0 00000000 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: atf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: aaf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011014: ttf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011018: tbf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001101c: taf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11010 00900000 00900000 00900000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011020: aaf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011024: abf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011028: tbf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001102c: ttf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11020 00900000 00900000 00900000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011030: atf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011034: taf4's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 00011038: abf2's .got.plt entry [R_ARM_JUMP_SLOT]
#------ 0001103c: aaf1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11030 00900000 00900000 00900000 00a00000 .*
#------------------------------------------------------------------------------
#------ 00011040: atf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011044: abf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011048: taf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001104c: ttf1's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11040 04a00000 08a00000 0da00000 0fa00000 .*
#------------------------------------------------------------------------------
#------ 00011050: tbf1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011054: atf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011058: abf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001105c: ttf3's .igot.plt entry [R_ARM_IRELATIVE]
#------------------------------------------------------------------------------
11050 11a00000 18a00000 1ca00000 23a00000 .*
#------------------------------------------------------------------------------
#------ 00011060: tbf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011064: taf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011068: aaf3's .igot.plt entry [R_ARM_IRELATIVE]
#------ 0001106c: .got entry for foo [R_ARM_RELATIVE]
#------------------------------------------------------------------------------
11060 25a00000 21a00000 14a00000 00000100 .*
#------------------------------------------------------------------------------
#------ 00011070: .got entry for foo [R_ARM_RELATIVE]
#------ 00011074: .got entry for atf2 [R_ARM_GLOB_DAT]
#------ 00011078: .got entry for aaf4 [R_ARM_GLOB_DAT]
#------ 0001107c: .got entry for ttf2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11070 00000100 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00011080: .got entry for tbf2 [R_ARM_GLOB_DAT]
#------ 00011084: .got entry for taf2 [R_ARM_GLOB_DAT]
#------ 00011088: .got entry for aaf2 [R_ARM_GLOB_DAT]
#------ 0001108c: .got entry for abf4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11080 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 00011090: .got entry for tbf4 [R_ARM_GLOB_DAT]
#------ 00011094: .got entry for ttf4 [R_ARM_GLOB_DAT]
#------ 00011098: .got entry for atf4 [R_ARM_GLOB_DAT]
#------ 0001109c: .got entry for taf4 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11090 00000000 00000000 00000000 00000000 .*
#------------------------------------------------------------------------------
#------ 000110a0: .got entry for abf2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
110a0 00000000 .*

View File

@ -0,0 +1,80 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 62 entries:
Offset Info Type Sym\.Value Sym\. Name
0001106c ......17 R_ARM_RELATIVE
00011070 ......17 R_ARM_RELATIVE
00010004 ......a0 R_ARM_IRELATIVE
0001000c ......a0 R_ARM_IRELATIVE
00010014 ......a0 R_ARM_IRELATIVE
0001001c ......a0 R_ARM_IRELATIVE
00010024 ......a0 R_ARM_IRELATIVE
0001002c ......a0 R_ARM_IRELATIVE
00010064 ......a0 R_ARM_IRELATIVE
0001006c ......a0 R_ARM_IRELATIVE
00010074 ......a0 R_ARM_IRELATIVE
0001007c ......a0 R_ARM_IRELATIVE
00010084 ......a0 R_ARM_IRELATIVE
0001008c ......a0 R_ARM_IRELATIVE
0001103c ......a0 R_ARM_IRELATIVE
00011040 ......a0 R_ARM_IRELATIVE
00011044 ......a0 R_ARM_IRELATIVE
00011048 ......a0 R_ARM_IRELATIVE
0001104c ......a0 R_ARM_IRELATIVE
00011050 ......a0 R_ARM_IRELATIVE
00011054 ......a0 R_ARM_IRELATIVE
00011058 ......a0 R_ARM_IRELATIVE
0001105c ......a0 R_ARM_IRELATIVE
00011060 ......a0 R_ARM_IRELATIVE
00011064 ......a0 R_ARM_IRELATIVE
00011068 ......a0 R_ARM_IRELATIVE
00010034 ......02 R_ARM_ABS32 00000000 aaf2
00010038 ......03 R_ARM_REL32 00000000 aaf2
00011088 ......15 R_ARM_GLOB_DAT 00000000 aaf2
0001003c ......02 R_ARM_ABS32 00000000 atf2
00010040 ......03 R_ARM_REL32 00000000 atf2
00011074 ......15 R_ARM_GLOB_DAT 00000000 atf2
00010044 ......02 R_ARM_ABS32 00000000 abf2
00010048 ......03 R_ARM_REL32 00000000 abf2
000110a0 ......15 R_ARM_GLOB_DAT 00000000 abf2
0001004c ......02 R_ARM_ABS32 00000000 taf2
00010050 ......03 R_ARM_REL32 00000000 taf2
00011084 ......15 R_ARM_GLOB_DAT 00000000 taf2
00010054 ......02 R_ARM_ABS32 00000000 ttf2
00010058 ......03 R_ARM_REL32 00000000 ttf2
0001107c ......15 R_ARM_GLOB_DAT 00000000 ttf2
0001005c ......02 R_ARM_ABS32 00000000 tbf2
00010060 ......03 R_ARM_REL32 00000000 tbf2
00011080 ......15 R_ARM_GLOB_DAT 00000000 tbf2
00010094 ......02 R_ARM_ABS32 00000000 aaf4
00010098 ......03 R_ARM_REL32 00000000 aaf4
00011078 ......15 R_ARM_GLOB_DAT 00000000 aaf4
0001009c ......02 R_ARM_ABS32 00000000 atf4
000100a0 ......03 R_ARM_REL32 00000000 atf4
00011098 ......15 R_ARM_GLOB_DAT 00000000 atf4
000100a4 ......02 R_ARM_ABS32 00000000 abf4
000100a8 ......03 R_ARM_REL32 00000000 abf4
0001108c ......15 R_ARM_GLOB_DAT 00000000 abf4
000100ac ......02 R_ARM_ABS32 00000000 taf4
000100b0 ......03 R_ARM_REL32 00000000 taf4
0001109c ......15 R_ARM_GLOB_DAT 00000000 taf4
000100b4 ......02 R_ARM_ABS32 00000000 ttf4
000100b8 ......03 R_ARM_REL32 00000000 ttf4
00011094 ......15 R_ARM_GLOB_DAT 00000000 ttf4
000100bc ......02 R_ARM_ABS32 00000000 tbf4
000100c0 ......03 R_ARM_REL32 00000000 tbf4
00011090 ......15 R_ARM_GLOB_DAT 00000000 tbf4
Relocation section '\.rel\.plt' at offset 0x81f0 contains 12 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT 00000000 atf2
00011010 ......16 R_ARM_JUMP_SLOT 00000000 aaf4
00011014 ......16 R_ARM_JUMP_SLOT 00000000 ttf2
00011018 ......16 R_ARM_JUMP_SLOT 00000000 tbf2
0001101c ......16 R_ARM_JUMP_SLOT 00000000 taf2
00011020 ......16 R_ARM_JUMP_SLOT 00000000 aaf2
00011024 ......16 R_ARM_JUMP_SLOT 00000000 abf4
00011028 ......16 R_ARM_JUMP_SLOT 00000000 tbf4
0001102c ......16 R_ARM_JUMP_SLOT 00000000 ttf4
00011030 ......16 R_ARM_JUMP_SLOT 00000000 atf4
00011034 ......16 R_ARM_JUMP_SLOT 00000000 taf4
00011038 ......16 R_ARM_JUMP_SLOT 00000000 abf2

View File

@ -0,0 +1,88 @@
.syntax unified
.arch armv6t2
.macro define,name,type
.type \name,%gnu_indirect_function
\type
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro define2,name
define aa\name,.arm
define at\name,.arm
define ab\name,.arm
define ta\name,.thumb_func
define tt\name,.thumb_func
define tb\name,.thumb_func
.endm
.macro test_relocs,name,width
bl \name(PLT)
b\width \name
beq\width \name
ldr r4,1f
ldr r4,2f
1:
.word \name(GOT)
2:
.word \name(GOT_PREL)
.endm
.macro test_relocs2,name,type,width
test_relocs a\type\name,\width
test_relocs t\type\name,\width
test_relocs ab\name,\width
test_relocs tb\name,\width
.endm
.macro diff,name
.word \name
.word \name-.
.endm
.macro alldirs,doit,name
\doit aa\name
\doit at\name
\doit ab\name
\doit ta\name
\doit tt\name
\doit tb\name
.endm
define2 f1
define2 f3
alldirs .globl,f3
alldirs .hidden,f3
.globl arm
.type arm,%function
.arm
arm:
test_relocs foo
test_relocs2 f1,a,
test_relocs2 f2,a,
test_relocs2 f3,a,
test_relocs2 f4,a,
.size arm,.-arm
.globl _thumb
.type _thumb,%function
.thumb_func
_thumb:
test_relocs foo
test_relocs2 f1,t,.w
test_relocs2 f2,t,.w
test_relocs2 f3,t,.w
test_relocs2 f4,t,.w
.size _thumb,.-_thumb
.data
foo:
.word 0x11223344
alldirs diff,f1
alldirs diff,f2
alldirs diff,f3
alldirs diff,f4

View File

@ -0,0 +1,154 @@
.*
Disassembly of section \.plt:
00009000 <\.plt>:
9000: e52de004 push {lr} ; \(str lr, \[sp, #-4\]!\)
9004: e59fe004 ldr lr, \[pc, #4\] ; 9010 <f3-0x1c>
9008: e08fe00e add lr, pc, lr
900c: e5bef008 ldr pc, \[lr, #8\]!
#------------------------------------------------------------------------------
#------ PC-relative offset of .got.plt
#------------------------------------------------------------------------------
9010: 00007ff0 \.word 0x00007ff0
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
9014: e28fc600 add ip, pc, #0
9018: e28cca07 add ip, ip, #28672 ; 0x7000
901c: e5bcfff0 ldr pc, \[ip, #4080\]! ; 0xff0
Disassembly of section \.iplt:
00009020 <f3-0xc>:
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
9020: e28fc600 add ip, pc, #0
9024: e28cca07 add ip, ip, #28672 ; 0x7000
9028: e5bcffe8 ldr pc, \[ip, #4072\]! ; 0xfe8
0000902c <f3>:
902c: e28fc600 add ip, pc, #0
9030: e28cca07 add ip, ip, #28672 ; 0x7000
9034: e5bcffe0 ldr pc, \[ip, #4064\]! ; 0xfe0
Disassembly of section \.text:
0000a000 <f1>:
a000: e1a0f00e mov pc, lr
a004: e1a0f00e mov pc, lr
0000a008 <_start>:
a008: eb0017fc bl 10000 <foo>
a00c: e59f400c ldr r4, \[pc, #12\] ; a020 <_start\+0x18>
a010: e59f400c ldr r4, \[pc, #12\] ; a024 <_start\+0x1c>
a014: e59f400c ldr r4, \[pc, #12\] ; a028 <_start\+0x20>
a018: e59f400c ldr r4, \[pc, #12\] ; a02c <_start\+0x24>
a01c: e59f500c ldr r5, \[pc, #12\] ; a030 <_start\+0x28>
#------------------------------------------------------------------------------
#------ foo
#------------------------------------------------------------------------------
a020: 00010000 \.word 0x00010000
#------------------------------------------------------------------------------
#------ PC-relative offset of foo
#------------------------------------------------------------------------------
a024: 00005fdc \.word 0x00005fdc
#------------------------------------------------------------------------------
#------ GP-relative offset of foo
#------------------------------------------------------------------------------
a028: fffff000 \.word 0xfffff000
#------------------------------------------------------------------------------
#------ .got offset for foo
#------------------------------------------------------------------------------
a02c: 00000020 \.word 0x00000020
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for foo
#------------------------------------------------------------------------------
a030: 00006fe8 \.word 0x00006fe8
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a034: ebfffbf9 bl 9020 <f3-0xc>
a038: e59f400c ldr r4, \[pc, #12\] ; a04c <_start\+0x44>
a03c: e59f400c ldr r4, \[pc, #12\] ; a050 <_start\+0x48>
a040: e59f400c ldr r4, \[pc, #12\] ; a054 <_start\+0x4c>
a044: e59f400c ldr r4, \[pc, #12\] ; a058 <_start\+0x50>
a048: e59f500c ldr r5, \[pc, #12\] ; a05c <_start\+0x54>
#------------------------------------------------------------------------------
#------ f1's .iplt entry
#------------------------------------------------------------------------------
a04c: 00009020 \.word 0x00009020
#------------------------------------------------------------------------------
#------ PC-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a050: ffffefd0 \.word 0xffffefd0
#------------------------------------------------------------------------------
#------ GP-relative offset of f1's .iplt entry
#------------------------------------------------------------------------------
a054: ffff8020 \.word 0xffff8020
#------------------------------------------------------------------------------
#------ .got offset for f1's .iplt entry
#------------------------------------------------------------------------------
a058: 0000001c \.word 0x0000001c
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f1's .iplt entry
#------------------------------------------------------------------------------
a05c: 00006fc0 \.word 0x00006fc0
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
a060: ebfffbeb bl 9014 <f3-0x18>
a064: e59f400c ldr r4, \[pc, #12\] ; a078 <_start\+0x70>
a068: e59f400c ldr r4, \[pc, #12\] ; a07c <_start\+0x74>
a06c: e59f400c ldr r4, \[pc, #12\] ; a080 <_start\+0x78>
a070: e59f400c ldr r4, \[pc, #12\] ; a084 <_start\+0x7c>
a074: e59f500c ldr r5, \[pc, #12\] ; a088 <_start\+0x80>
#------------------------------------------------------------------------------
#------ f2's .plt entry
#------------------------------------------------------------------------------
a078: 00009014 \.word 0x00009014
#------------------------------------------------------------------------------
#------ PC-relative offset of f2's .plt entry
#------------------------------------------------------------------------------
a07c: ffffef98 \.word 0xffffef98
#------------------------------------------------------------------------------
#------ GP-relative offset of f2's .plt entry
#------------------------------------------------------------------------------
a080: ffff8014 \.word 0xffff8014
#------------------------------------------------------------------------------
#------ .got offset for f2
#------------------------------------------------------------------------------
a084: 00000028 \.word 0x00000028
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f2
#------------------------------------------------------------------------------
a088: 00006fa0 \.word 0x00006fa0
a08c: ebfffbe6 bl 902c <f3>
a090: e59f400c ldr r4, \[pc, #12\] ; a0a4 <_start\+0x9c>
a094: e59f400c ldr r4, \[pc, #12\] ; a0a8 <_start\+0xa0>
a098: e59f400c ldr r4, \[pc, #12\] ; a0ac <_start\+0xa4>
a09c: e59f400c ldr r4, \[pc, #12\] ; a0b0 <_start\+0xa8>
a0a0: e59f500c ldr r5, \[pc, #12\] ; a0b4 <_start\+0xac>
#------------------------------------------------------------------------------
#------ f3
#------------------------------------------------------------------------------
a0a4: 0000902c \.word 0x0000902c
#------------------------------------------------------------------------------
#------ PC-relative offset of f3
#------------------------------------------------------------------------------
a0a8: ffffef84 \.word 0xffffef84
#------------------------------------------------------------------------------
#------ GP-relative offset of f3
#------------------------------------------------------------------------------
a0ac: ffff802c \.word 0xffff802c
#------------------------------------------------------------------------------
#------ .got offset for f3
#------------------------------------------------------------------------------
a0b0: 00000024 \.word 0x00000024
#------------------------------------------------------------------------------
#------ PC-relative offset of .got entry for f3
#------------------------------------------------------------------------------
a0b4: 00006f70 \.word 0x00006f70

View File

@ -0,0 +1,29 @@
.*
Contents of section \.data:
#------------------------------------------------------------------------------
#------ 00010000: foo
#------------------------------------------------------------------------------
10000 44332211 .*
Contents of section \.got:
#------------------------------------------------------------------------------
#------ 00011000: .got.plt
#------ 00011004: reserved .got.plt entry
#------ 00011008: reserved .got.plt entry
#------ 0001100c: f2's .got.plt entry [R_ARM_JUMP_SLOT]
#------------------------------------------------------------------------------
11000 00200100 00000000 00000000 00900000 .*
#------------------------------------------------------------------------------
#------ 00011010: f1's .igot.plt entry [R_ARM_IRELATIVE]
#------ 00011014: f3's .igot.plt pointer to 0xa004 [R_ARM_IRELATIVE]
#------ 00011018: .got entry for foo
#------ 0001101c: .got entry for f1's .iplt entry
#------------------------------------------------------------------------------
11010 00a00000 04a00000 00000100 20900000 .*
#------------------------------------------------------------------------------
#------ 00011020: .got entry for foo
#------ 00011024: .got entry for f3
#------ 00011028: .got entry for f2 [R_ARM_GLOB_DAT]
#------------------------------------------------------------------------------
11020 00000100 2c900000 00000000 .*

View File

@ -0,0 +1,10 @@
Relocation section '\.rel\.dyn' at offset 0x8000 contains 3 entries:
Offset Info Type Sym\.Value Sym\. Name
00011010 ......a0 R_ARM_IRELATIVE
00011014 ......a0 R_ARM_IRELATIVE
00011028 ......15 R_ARM_GLOB_DAT 00009014 f2
Relocation section '\.rel\.plt' at offset 0x8018 contains 1 entries:
Offset Info Type Sym\.Value Sym\. Name
0001100c ......16 R_ARM_JUMP_SLOT 00009014 f2

View File

@ -0,0 +1,44 @@
.macro define,name
.type \name,%gnu_indirect_function
\name:
mov pc,lr
.size \name,.-\name
.endm
.macro test_relocs,name
bl \name
ldr r4,1f
ldr r4,2f
ldr r4,3f
ldr r4,4f
ldr r5,5f
1:
.word \name
2:
.word \name-.
3:
.word \name(GOTOFF)
4:
.word \name(GOT)
5:
.word \name(GOT_PREL)
.endm
.global f3
.hidden f3
define f1
# f2 provided by ifunc-3.so
define f3
.globl _start
_start:
test_relocs foo
test_relocs f1
test_relocs f2
test_relocs f3
.size _start,.-_start
.data
foo:
.word 0x11223344

View File

@ -0,0 +1,33 @@
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
. = 0x07000;
.hash : { *(.hash) }
.gnu.hash : { *(.gnu.hash) }
.dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) }
. = 0x08000;
.rel.dyn : {
*(.rel.dyn)
*(.rel.data)
*(.rel.got)
PROVIDE_HIDDEN (__irel_start = .);
*(.rel.iplt)
PROVIDE_HIDDEN (__irel_end = .);
}
.rel.plt : { *(.rel.plt) }
. = 0x09000;
.plt : { *(.plt) }
.iplt : { *(.iplt) }
. = 0x0A000;
.text : { *(.text) }
. = 0x10000;
.data : { *(.data) }
. = 0x11000;
.got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
. = 0x12000;
.dynamic : { *(.dynamic) }
. = 0x13000;
.bss : { *(.bss) }
}

View File

@ -0,0 +1,21 @@
OUTPUT_ARCH(arm)
ENTRY(_start)
SECTIONS
{
. = 0x08000;
.rel.dyn : {
PROVIDE_HIDDEN (__irel_start = .);
*(.rel.iplt)
PROVIDE_HIDDEN (__irel_end = .);
}
. = 0x09000;
.iplt : { *(.iplt) }
. = 0x0A000;
.text : { *(.text) }
. = 0x10000;
.data : { *(.data) }
. = 0x11000;
.got : { *(.got.plt) *(.igot.plt) *(.got) *(.igot) }
. = 0x12000;
.bss : { *(.bss) }
}

View File

@ -1,3 +1,7 @@
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* arm-dis.c (get_sym_code_type): Treat STT_GNU_IFUNCs as code.
2011-03-14 Richard Sandiford <richard.sandiford@linaro.org>
* arm-dis.c (get_sym_code_type): Don't check for STT_ARM_TFUNC.

View File

@ -4525,7 +4525,7 @@ get_sym_code_type (struct disassemble_info *info,
type = ELF_ST_TYPE (es->internal_elf_sym.st_info);
/* If the symbol has function type then use that. */
if (type == STT_FUNC)
if (type == STT_FUNC || type == STT_GNU_IFUNC)
{
if (ARM_SYM_BRANCH_TYPE (&es->internal_elf_sym) == ST_BRANCH_TO_THUMB)
*map_type = MAP_THUMB;