aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2023-12-22 09:35:52 +0100
committerJan Beulich <jbeulich@suse.com>2023-12-22 09:35:52 +0100
commit1124f3d536e5e03c3fd433c41b947fc49674c0cf (patch)
tree8e3f995929f4279134252a7b4f57cccedc3cf1fb
parent0495b25221b3f6b3b26a7ea898a8f0c5a712e43a (diff)
downloadbinutils-1124f3d536e5e03c3fd433c41b947fc49674c0cf.zip
binutils-1124f3d536e5e03c3fd433c41b947fc49674c0cf.tar.gz
binutils-1124f3d536e5e03c3fd433c41b947fc49674c0cf.tar.bz2
hppa/ELF: fix .text/.data interaction with .previous
For some ELF targets .text/.data are overridden. In that case obj_elf_{text,data}() need calling, just like .code vectors to that function for the remaining ELF targets. While there also hand on the function arguments, even if right now they're meaningless. This matches what other targets' code does.
-rw-r--r--gas/config/tc-hppa.c19
1 files changed, 15 insertions, 4 deletions
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 2e5de07..aabb147 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -6199,7 +6199,7 @@ pa_callinfo (int unused ATTRIBUTE_UNUSED)
label when finished. */
static void
-pa_text (int unused ATTRIBUTE_UNUSED)
+pa_text (int arg)
{
#ifdef OBJ_SOM
current_space = is_defined_space ("$TEXT$");
@@ -6207,21 +6207,32 @@ pa_text (int unused ATTRIBUTE_UNUSED)
= pa_subsegment_to_subspace (current_space->sd_seg, 0);
#endif
- s_text (0);
+#ifdef OBJ_ELF
+ obj_elf_text (arg);
+#else
+ s_text (arg);
+#endif
+
pa_undefine_label ();
}
/* Switch to the data space. As usual delete our label. */
static void
-pa_data (int unused ATTRIBUTE_UNUSED)
+pa_data (int arg)
{
#ifdef OBJ_SOM
current_space = is_defined_space ("$PRIVATE$");
current_subspace
= pa_subsegment_to_subspace (current_space->sd_seg, 0);
#endif
- s_data (0);
+
+#ifdef OBJ_ELF
+ obj_elf_data (arg);
+#else
+ s_data (arg);
+#endif
+
pa_undefine_label ();
}