1#! /bin/sh 2# Copyright (C) 2014 Red Hat, Inc. 3# This file is part of elfutils. 4# 5# This file is free software; you can redistribute it and/or modify 6# it under the terms of the GNU General Public License as published by 7# the Free Software Foundation; either version 3 of the License, or 8# (at your option) any later version. 9# 10# elfutils is distributed in the hope that it will be useful, but 11# WITHOUT ANY WARRANTY; without even the implied warranty of 12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13# GNU General Public License for more details. 14# 15# You should have received a copy of the GNU General Public License 16# along with this program. If not, see <http://www.gnu.org/licenses/>. 17 18. $srcdir/test-subr.sh 19 20# See run-addrcfi.sh for testfilearm. 21 22# = testfileppc32attrs.s = 23# .gnu_attribute 8,1 24# .gnu_attribute 12,1 25# 26# gcc -m32 -c testfileppc32attrs.s 27 28testfiles testfilearm testfileppc32attrs.o 29 30testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF 31 32Object attributes section [27] '.ARM.attributes' of 53 bytes at offset 0x718: 33 Owner Size 34 aeabi 52 35 File: 42 36 CPU_name: 7-A 37 CPU_arch: v7 38 CPU_arch_profile: Application 39 ARM_ISA_use: Yes 40 THUMB_ISA_use: Thumb-2 41 VFP_arch: VFPv3-D16 42 ABI_PCS_wchar_t: 4 43 ABI_FP_rounding: Needed 44 ABI_FP_denormal: Needed 45 ABI_FP_exceptions: Needed 46 ABI_FP_number_model: IEEE 754 47 ABI_align8_needed: Yes 48 ABI_align8_preserved: Yes, except leaf SP 49 ABI_enum_size: int 50 ABI_HardFP_use: SP and DP 51 ABI_VFP_args: VFP registers 52 CPU_unaligned_access: v6 53EOF 54 55testrun_compare ${abs_top_builddir}/src/readelf -A testfileppc32attrs.o <<\EOF 56 57Object attributes section [ 4] '.gnu.attributes' of 18 bytes at offset 0x34: 58 Owner Size 59 gnu 17 60 File: 9 61 GNU_Power_ABI_Vector: Generic 62 GNU_Power_ABI_Struct_Return: r3/r4 63EOF 64 65exit 0 66