aboutsummaryrefslogtreecommitdiff
path: root/elfcpp
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-07-06 01:08:16 +0930
committerAlan Modra <amodra@gmail.com>2018-07-06 15:18:51 +0930
commit724436fccb68156ff53b7b03cb7f41547a65c30c (patch)
tree2d3e5e03ccebc48c7e4c613c26a340cd6efcadd4 /elfcpp
parent6821842f15efaec045d9e38f115af01ddffdaede (diff)
downloadgdb-724436fccb68156ff53b7b03cb7f41547a65c30c.zip
gdb-724436fccb68156ff53b7b03cb7f41547a65c30c.tar.gz
gdb-724436fccb68156ff53b7b03cb7f41547a65c30c.tar.bz2
[GOLD] PowerPC .gnu.attributes support
elfcpp/ * powerpc.h (Tag_GNU_Power_ABI_FP): Define. (Tag_GNU_Power_ABI_Vector, Tag_GNU_Power_ABI_Struct_Return): Define. gold/ * powerpc.cc: Include attributes.h. (Powerpc_relobj::attributes_section_data_): New variable, with accessor and associated constructor and destructor support. (Powerpc_dynobj::attributes_section_data_): Likewise. (Powerpc_relobj::do_read_symbols): Stash SHT_GNU_ATTRIBUTES section contents in attributes_section_data_. (Powerpc_dynobj::do_read_symbols): Likewise. (Target_powerpc): Add attributes_section_data_, last_fp_, last_ld_, last_vec_, and last_struct_ vars. (Target_powerpc::merge_object_attributes): New function. (Target_powerpc::do_finalize_sections): Iterate over input objects merging attributes. Create output attributes section.
Diffstat (limited to 'elfcpp')
-rw-r--r--elfcpp/ChangeLog5
-rw-r--r--elfcpp/powerpc.h26
2 files changed, 31 insertions, 0 deletions
diff --git a/elfcpp/ChangeLog b/elfcpp/ChangeLog
index d031d1b..fa33bf1 100644
--- a/elfcpp/ChangeLog
+++ b/elfcpp/ChangeLog
@@ -1,3 +1,8 @@
+2018-07-06 Alan Modra <amodra@gmail.com>
+
+ * powerpc.h (Tag_GNU_Power_ABI_FP): Define.
+ (Tag_GNU_Power_ABI_Vector, Tag_GNU_Power_ABI_Struct_Return): Define.
+
2018-06-24 Nick Clifton <nickc@redhat.com>
2.31 branch created.
diff --git a/elfcpp/powerpc.h b/elfcpp/powerpc.h
index 71de459..5996691 100644
--- a/elfcpp/powerpc.h
+++ b/elfcpp/powerpc.h
@@ -230,6 +230,32 @@ enum
EF_PPC64_ABI = 3
};
+// Object attribute tags. 0-3 are generic.
+enum
+{
+ // FP ABI, low 2 bits:
+ // 1 for double precision hard-float,
+ // 2 for soft-float,
+ // 3 for single precision hard-float.
+ // 0 for not tagged or not using any ABIs affected by the differences.
+ // Next 2 bits:
+ // 1 for ibm long double
+ // 2 for 64-bit long double
+ // 3 for IEEE long double.
+ // 0 for not tagged or not using any ABIs affected by the differences.
+ Tag_GNU_Power_ABI_FP = 4,
+
+ // Value 1 for general purpose registers only, 2 for AltiVec
+ // registers, 3 for SPE registers; 0 for not tagged or not using any
+ // ABIs affected by the differences.
+ Tag_GNU_Power_ABI_Vector = 8,
+
+ // Value 1 for ABIs using r3/r4 for returning structures <= 8 bytes,
+ // 2 for ABIs using memory; 0 for not tagged or not using any ABIs
+ // affected by the differences.
+ Tag_GNU_Power_ABI_Struct_Return = 12
+};
+
// DT_PPC_OPT bits
enum
{