diff options
Diffstat (limited to 'meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch')
-rw-r--r-- | meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch b/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch deleted file mode 100644 index 1e42dc60..00000000 --- a/meta-microblaze/recipes-devtools/binutils/binutils/0029-gas-revert-moving-of-md_pseudo_table-from-const.patch +++ /dev/null | |||
@@ -1,85 +0,0 @@ | |||
1 | From 24d43f5ce8746c653de7de3fad46915755ba789d Mon Sep 17 00:00:00 2001 | ||
2 | From: Mahesh Bodapati <mbodapat@xilinx.com> | ||
3 | Date: Mon, 8 Nov 2021 21:57:13 +0530 | ||
4 | Subject: [PATCH 29/34] gas: revert moving of md_pseudo_table from const | ||
5 | |||
6 | The base system expect md_pseudo_table to be constant, Changing the | ||
7 | definition will break other architectures when compiled with a | ||
8 | unified source code. | ||
9 | |||
10 | Patch reverts the change away from const, and implements a newer | ||
11 | dynamic handler that passes the correct argument value based on word | ||
12 | size. | ||
13 | |||
14 | Upstream-Status: Pending | ||
15 | |||
16 | Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> | ||
17 | --- | ||
18 | gas/config/tc-microblaze.c | 16 +++++++++++++--- | ||
19 | gas/tc.h | 2 +- | ||
20 | 2 files changed, 14 insertions(+), 4 deletions(-) | ||
21 | |||
22 | diff --git a/gas/config/tc-microblaze.c b/gas/config/tc-microblaze.c | ||
23 | index 31677446114..6b398ab5605 100644 | ||
24 | --- a/gas/config/tc-microblaze.c | ||
25 | +++ b/gas/config/tc-microblaze.c | ||
26 | @@ -385,6 +385,17 @@ microblaze_s_weakext (int ignore ATTRIBUTE_UNUSED) | ||
27 | demand_empty_rest_of_line (); | ||
28 | } | ||
29 | |||
30 | +/* Handle the .gpword pseudo-op, Pass to s_rva */ | ||
31 | + | ||
32 | +static void | ||
33 | +microblaze_s_gpword (int ignore ATTRIBUTE_UNUSED) | ||
34 | +{ | ||
35 | + int size = 4; | ||
36 | + if (microblaze_arch_size == 64) | ||
37 | + size = 8; | ||
38 | + s_rva(size); | ||
39 | +} | ||
40 | + | ||
41 | /* This table describes all the machine specific pseudo-ops the assembler | ||
42 | has to support. The fields are: | ||
43 | Pseudo-op name without dot | ||
44 | @@ -392,7 +403,7 @@ microblaze_s_weakext (int ignore ATTRIBUTE_UNUSED) | ||
45 | Integer arg to pass to the function. */ | ||
46 | /* If the pseudo-op is not found in this table, it searches in the obj-elf.c, | ||
47 | and then in the read.c table. */ | ||
48 | -pseudo_typeS md_pseudo_table[] = | ||
49 | +const pseudo_typeS md_pseudo_table[] = | ||
50 | { | ||
51 | {"lcomm", microblaze_s_lcomm, 1}, | ||
52 | {"data", microblaze_s_data, 0}, | ||
53 | @@ -401,7 +412,7 @@ pseudo_typeS md_pseudo_table[] = | ||
54 | {"data32", cons, 4}, /* Same as word. */ | ||
55 | {"ent", s_func, 0}, /* Treat ent as function entry point. */ | ||
56 | {"end", microblaze_s_func, 1}, /* Treat end as function end point. */ | ||
57 | - {"gpword", s_rva, 4}, /* gpword label => store resolved label address in data section. */ | ||
58 | + {"gpword", microblaze_s_gpword, 0}, /* gpword label => store resolved label address in data section. */ | ||
59 | {"weakext", microblaze_s_weakext, 0}, | ||
60 | {"rodata", microblaze_s_rdata, 0}, | ||
61 | {"sdata2", microblaze_s_rdata, 1}, | ||
62 | @@ -3456,7 +3467,6 @@ md_parse_option (int c, const char * arg ATTRIBUTE_UNUSED) | ||
63 | case OPTION_M64: | ||
64 | //if (arg != NULL && strcmp (arg, "64") == 0) | ||
65 | microblaze_arch_size = 64; | ||
66 | - md_pseudo_table[7].poc_val = 8; | ||
67 | break; | ||
68 | default: | ||
69 | return 0; | ||
70 | diff --git a/gas/tc.h b/gas/tc.h | ||
71 | index bb9a935a353..4a740f9bdd9 100644 | ||
72 | --- a/gas/tc.h | ||
73 | +++ b/gas/tc.h | ||
74 | @@ -22,7 +22,7 @@ | ||
75 | /* In theory (mine, at least!) the machine dependent part of the assembler | ||
76 | should only have to include one file. This one. -- JF */ | ||
77 | |||
78 | -extern pseudo_typeS md_pseudo_table[]; | ||
79 | +extern const pseudo_typeS md_pseudo_table[]; | ||
80 | |||
81 | const char * md_atof (int, char *, int *); | ||
82 | int md_parse_option (int, const char *); | ||
83 | -- | ||
84 | 2.37.1 (Apple Git-137.1) | ||
85 | |||