binutils-gdb/ld/testsuite/ld-arm/attr-merge-arch-2a.s
Terry Guo 70e99720f9 Make the linker return an error status if it fails to merge ARM binaries with
different architecture tags.  Add a test case to make sure that this works,
and update readelf so that it will not seg-fault when trying to display the
attributes of binaries with invalid architecture tags.

	* elf32-arm.c (elf32_arm_merge_eabi_attributes): Return false if
	failed to merge.

	* ld-arm/attr-merge-arch-2.d: New test case.
	* ld-arm/attr-merge-arch-2a.s: New test case source file.
	* ld-arm/attr-merge-arch-2b.s: Likewise.
	* ld-arm/arm-elf.exp: Run new test case.

	* readelf.c (display_arm_attribute): Use unsigned int type for
	tag, val and type variables.
2014-09-16 13:08:22 +01:00

19 lines
374 B
ArmAsm

.syntax unified
.cpu cortex-m4
.fpu softvfp
.thumb
.file "m.c"
.text
.align 2
.global main
.thumb
.thumb_func
.type main, %function
main:
push {r7, lr}
add r7, sp, #0
bl foo
mov r3, r0
mov r0, r3
pop {r7, pc}