aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog8
-rw-r--r--binutils/readelf.c3
-rw-r--r--binutils/testsuite/binutils-all/note-5.d11
-rw-r--r--binutils/testsuite/binutils-all/note-5.s14
-rw-r--r--binutils/testsuite/binutils-all/objcopy.exp1
5 files changed, 36 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 702c0cf..3b98be4 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,11 @@
+2018-04-26 Nick Clifton <nickc@redhat.com>
+
+ * readelf.c (is_32bit_abs_reloc): Support R_PARISC_DIR32 as a
+ 32-bit absolute reloc for the HPPA target.
+ * testsuite/binutils-all/note-5.d: New test.
+ * testsuite/binutils-all/note-5.s: Source file for new test.
+ * testsuite/binutils-all/objcopy.exp: Run new test.
+
2018-04-25 Christophe Lyon <christophe.lyon@st.com>
* testsuite/binutils-all/elfedit-2.d: Accept arm*-*-uclinuxfdpiceabi.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index e8e1b96..eecc05b 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -12305,7 +12305,8 @@ is_32bit_abs_reloc (Filedata * filedata, unsigned int reloc_type)
case EM_OR1K:
return reloc_type == 1; /* R_OR1K_32. */
case EM_PARISC:
- return (reloc_type == 1 /* R_PARISC_DIR32. */
+ return (reloc_type == 1 /* R_PARISC_DIR32. */
+ || reloc_type == 2 /* R_PARISC_DIR21L. */
|| reloc_type == 41); /* R_PARISC_SECREL32. */
case EM_PJ:
case EM_PJ_OLD:
diff --git a/binutils/testsuite/binutils-all/note-5.d b/binutils/testsuite/binutils-all/note-5.d
new file mode 100644
index 0000000..d3bef15
--- /dev/null
+++ b/binutils/testsuite/binutils-all/note-5.d
@@ -0,0 +1,11 @@
+#PROG: objcopy
+#as: --generate-missing-build-notes=yes
+#readelf: --notes --wide
+#name: assembler generated build notes
+#source: note-5.s
+
+#...
+Displaying notes found in: .gnu.build.attributes
+[ ]+Owner[ ]+Data size[ ]+Description
+[ ]+GA\$<version>3a1[ ]+0x000000(08|10)[ ]+OPEN[ ]+Applies to region from 0 to 0x.. \(note_5.s\)
+#...
diff --git a/binutils/testsuite/binutils-all/note-5.s b/binutils/testsuite/binutils-all/note-5.s
new file mode 100644
index 0000000..4375b25
--- /dev/null
+++ b/binutils/testsuite/binutils-all/note-5.s
@@ -0,0 +1,14 @@
+ .text
+ .global note_5.s
+note_5.s:
+ .dc.l 2
+ .dc.l 4
+ .dc.l 6
+ .dc.l 8
+ .dc.l 8
+ .dc.l 8
+ .dc.l 8
+ .dc.l 8
+ .dc.l 8
+ .dc.l 8
+ \ No newline at end of file
diff --git a/binutils/testsuite/binutils-all/objcopy.exp b/binutils/testsuite/binutils-all/objcopy.exp
index 2a2e757..3381236 100644
--- a/binutils/testsuite/binutils-all/objcopy.exp
+++ b/binutils/testsuite/binutils-all/objcopy.exp
@@ -1058,6 +1058,7 @@ if [is_elf_format] {
run_dump_test "note-3-32"
run_dump_test "note-4-32"
}
+ run_dump_test "note-5"
}
run_dump_test "copy-2"