summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2017-02-15 14:30:27 +0100
committerMark Wielaard <[email protected]>2017-03-24 17:34:33 +0100
commitb1042ce216eaef96099f263fb81141dbdec004fd (patch)
tree07692fa3099233546ab9e1415a03ea599c08767b /tests
parente22cc80923f94e54c9384421904461958899db5b (diff)
backends: Add support for EM_PPC64 GNU_ATTRIBUTES.
ppc64 and ppc64le ELF files can also contain a power specific .gnu.attributes section. Add support for those and recognize the new GNU_Power_ABI_FP Single-precision hard float value. Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog5
-rw-r--r--tests/Makefile.am4
-rwxr-xr-xtests/run-readelf-A.sh16
-rw-r--r--tests/testfileppc64attrs.o.bz2bin0 -> 222 bytes
4 files changed, 22 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index cc6a19bf..e6656c75 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,8 @@
+2017-02-15 Mark Wielaard <[email protected]>
+
+ * Makefile.am (EXTRA_DIST): Add testfileppc64attrs.o.bz2.
+ * run-readelf-A.sh: Add testfileppc64.o test.
+
2017-02-15 Ulf Hermann <[email protected]>
* elfstrmerge.c: Include system.h.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d4659cdb..a27e8687 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,6 +1,6 @@
## Process this file with automake to create Makefile.in
##
-## Copyright (C) 1996-2016 Red Hat, Inc.
+## Copyright (C) 1996-2017 Red Hat, Inc.
## This file is part of elfutils.
##
## This file is free software; you can redistribute it and/or modify
@@ -317,7 +317,7 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
run-aggregate-size.sh testfile-sizes1.o.bz2 testfile-sizes2.o.bz2 \
testfile-sizes3.o.bz2 \
run-readelf-A.sh testfileppc32attrs.o.bz2 \
- testfilesparc64attrs.o.bz2 \
+ testfilesparc64attrs.o.bz2 testfileppc64attrs.o.bz2 \
testfile-debug-types.bz2 \
run-getsrc-die.sh run-strptr.sh \
testfile-x32-core.bz2 testfile-x32.bz2 \
diff --git a/tests/run-readelf-A.sh b/tests/run-readelf-A.sh
index 03d511c9..b7432bec 100755
--- a/tests/run-readelf-A.sh
+++ b/tests/run-readelf-A.sh
@@ -32,7 +32,12 @@
#
# gcc -c testfilesparc64attrs.s
-testfiles testfilearm testfileppc32attrs.o testfilesparc64attrs.o
+# = testfileppc64attrs.s =
+# .gnu_attribute 4,3
+#
+# gcc -c testfileppc64attrs.s
+
+testfiles testfilearm testfileppc32attrs.o testfilesparc64attrs.o testfileppc64attrs.o
testrun_compare ${abs_top_builddir}/src/readelf -A testfilearm <<\EOF
@@ -79,4 +84,13 @@ Object attributes section [ 4] '.gnu.attributes' of 21 bytes at offset 0x40:
GNU_Sparc_HWCAPS2: fjathplus,adp,mwait,xmont
EOF
+testrun_compare ${abs_top_builddir}/src/readelf -A testfileppc64attrs.o <<\EOF
+
+Object attributes section [ 4] '.gnu.attributes' of 16 bytes at offset 0x40:
+ Owner Size
+ gnu 15
+ File: 7
+ GNU_Power_ABI_FP: Single-precision hard float
+EOF
+
exit 0
diff --git a/tests/testfileppc64attrs.o.bz2 b/tests/testfileppc64attrs.o.bz2
new file mode 100644
index 00000000..5af2ab6f
--- /dev/null
+++ b/tests/testfileppc64attrs.o.bz2
Binary files differ