aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf-attrs.c2
-rw-r--r--gas/ChangeLog4
-rw-r--r--gas/testsuite/gas/riscv/attribute-empty.d3
4 files changed, 13 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 529ac73..de44928 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,4 +1,9 @@
2019-01-16 Kito Cheng <kito@andestech.com>
+
+ * elf-attrs.c (vendor_obj_attr_size): Return 0 if size is 0 even
+ for OBJ_ATTR_PROC.
+
+2019-01-16 Kito Cheng <kito@andestech.com>
Nelson Chu <nelson@andestech.com>
* elfnn-riscv.c (in_subsets): New.
diff --git a/bfd/elf-attrs.c b/bfd/elf-attrs.c
index d238112..bfe135e 100644
--- a/bfd/elf-attrs.c
+++ b/bfd/elf-attrs.c
@@ -106,7 +106,7 @@ vendor_obj_attr_size (bfd *abfd, int vendor)
size += obj_attr_size (list->tag, &list->attr);
/* <size> <vendor_name> NUL 0x1 <size> */
- return ((size || vendor == OBJ_ATTR_PROC)
+ return (size
? size + 10 + strlen (vendor_name)
: 0);
}
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 3228342..cd80c48 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,4 +1,8 @@
2019-01-16 Kito Cheng <kito@andestech.com>
+
+ * testsuite/gas/riscv/attribute-empty.d: New.
+
+2019-01-16 Kito Cheng <kito@andestech.com>
Nelson Chu <nelson@andestech.com>
* config/tc-riscv.c (DEFAULT_RISCV_ATTR): Define to 0 if not defined.
diff --git a/gas/testsuite/gas/riscv/attribute-empty.d b/gas/testsuite/gas/riscv/attribute-empty.d
new file mode 100644
index 0000000..4f0982a
--- /dev/null
+++ b/gas/testsuite/gas/riscv/attribute-empty.d
@@ -0,0 +1,3 @@
+#as: -mno-arch-attr
+#readelf: -A
+#source: empty.s