summaryrefslogtreecommitdiff
path: root/system/elfutils/ppc-ldbl.patch
blob: c1d9a23d5c5adc0ee5a8b40f610dae552d1a8593 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Ref: #1268
Upstream-URL: https://patchwork.sourceware.org/project/elfutils/patch/20250527050544.59645-1-AWilcox@Wilcox-Tech.com/

From cffed747a30c941608eac85b26ae52797e10de06 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Tue, 27 May 2025 04:46:30 +0000
Subject: [PATCH] backends: Add support for PPC long double tags

When an explicit type of long double is specified in the ELF
GNU_Power_ABI_FP attribute, elflint and friends were erroring out:

    section [36] '.gnu.attributes': offset 15: unrecognized GNU_Power_ABI_FP attribute value 9

Add the different long double tags to fp_kinds so that these values
are correctly recognised and printed.

Signed-off-by: A. Wilcox <AWilcox@Wilcox-Tech.com>
---
 backends/ppc_attrs.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/backends/ppc_attrs.c b/backends/ppc_attrs.c
index 48d7129d..6b00bccd 100644
--- a/backends/ppc_attrs.c
+++ b/backends/ppc_attrs.c
@@ -52,6 +52,18 @@ ppc_check_object_attribute (Ebl *ebl __attribute__ ((unused)),
 	    "Hard float",
 	    "Soft float",
 	    "Single-precision hard float",
+	    "Hard or soft float (IBM style long doubles)",
+	    "Hard float (IBM style long doubles)",
+	    "Soft float (IBM style long doubles)",
+	    "Single-precision hard float (IBM style long doubles)",
+	    "Hard or soft float (64-bit long doubles)",
+	    "Hard float (64-bit long doubles)",
+	    "Soft float (64-bit long doubles)",
+	    "Single-precision hard float (64-bit long doubles)",
+	    "Hard or soft float (IEEE 128-bit long doubles)",
+	    "Hard float (IEEE 128-bit long doubles)",
+	    "Soft float (IEEE 128-bit long doubles)",
+	    "Single-precision hard float (IEEE 128-bit long doubles)",
 	  };
 	if (value < sizeof fp_kinds / sizeof fp_kinds[0])
 	  *value_name = fp_kinds[value];
-- 
2.40.0