aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>1994-04-18 21:29:28 +0000
committerJeff Law <law@redhat.com>1994-04-18 21:29:28 +0000
commit9de7c1fc8d7aeb8114257bf689f753b2b42e573c (patch)
tree65d4e342df88f6e2200b3dd71edda9d810e9ef92
parent694787005c120bdccfedefcf00187036009ca964 (diff)
downloadgdb-9de7c1fc8d7aeb8114257bf689f753b2b42e573c.zip
gdb-9de7c1fc8d7aeb8114257bf689f753b2b42e573c.tar.gz
gdb-9de7c1fc8d7aeb8114257bf689f753b2b42e573c.tar.bz2
* config/tc-hppa.c (pa_parse_space_stmt): Use the built-in
defaults for defined, private, and spnum fields for the $TEXT$ and $PRIVATE$ spaces. Do not clobber spnum. Do not reset the segment if just updating a space. (pa_spaces_begin): Set BFD section flags for all built-in subspaces.
-rw-r--r--gas/ChangeLog9
-rw-r--r--gas/config/tc-hppa.c44
2 files changed, 45 insertions, 8 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 553d0ef..5149217 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,12 @@
+Mon Apr 18 14:28:22 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
+
+ * config/tc-hppa.c (pa_parse_space_stmt): Use the built-in
+ defaults for defined, private, and spnum fields for the
+ $TEXT$ and $PRIVATE$ spaces. Do not clobber spnum. Do
+ not reset the segment if just updating a space.
+ (pa_spaces_begin): Set BFD section flags for all built-in
+ subspaces.
+
Fri Apr 15 10:51:51 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* ecoff.c (first_proc_ptr): New static variable.
diff --git a/gas/config/tc-hppa.c b/gas/config/tc-hppa.c
index 60e9b7b..c30f51e 100644
--- a/gas/config/tc-hppa.c
+++ b/gas/config/tc-hppa.c
@@ -5077,7 +5077,7 @@ pa_parse_space_stmt (space_name, create_flag)
{
char *name, *ptemp, c;
char loadable, defined, private, sort;
- int spnum;
+ int spnum, temp;
asection *seg = NULL;
sd_chain_struct *space;
@@ -5090,12 +5090,18 @@ pa_parse_space_stmt (space_name, create_flag)
if (strcmp (space_name, "$TEXT$") == 0)
{
seg = pa_def_spaces[0].segment;
+ defined = pa_def_spaces[0].defined;
+ private = pa_def_spaces[0].private;
sort = pa_def_spaces[0].sort;
+ spnum = pa_def_spaces[0].spnum;
}
else if (strcmp (space_name, "$PRIVATE$") == 0)
{
seg = pa_def_spaces[1].segment;
+ defined = pa_def_spaces[1].defined;
+ private = pa_def_spaces[1].private;
sort = pa_def_spaces[1].sort;
+ spnum = pa_def_spaces[1].spnum;
}
if (!is_end_of_statement ())
@@ -5105,8 +5111,12 @@ pa_parse_space_stmt (space_name, create_flag)
/* First see if the space was specified as a number rather than
as a name. According to the PA assembly manual the rest of
the line should be ignored. */
- if ((spnum = pa_parse_number (&ptemp, 0)) >= 0)
- input_line_pointer = ptemp;
+ temp = pa_parse_number (&ptemp, 0);
+ if (temp >= 0)
+ {
+ spnum = temp;
+ input_line_pointer = ptemp;
+ }
else
{
while (!is_end_of_statement ())
@@ -5169,7 +5179,6 @@ pa_parse_space_stmt (space_name, create_flag)
SPACE_SPNUM (space) = spnum;
SPACE_DEFINED (space) = defined & 1;
SPACE_USER_DEFINED (space) = 1;
- space->sd_seg = seg;
}
#ifdef obj_set_section_attributes
@@ -5624,12 +5633,13 @@ pa_spaces_begin ()
/* For SOM we want to replace the standard .text, .data, and .bss
- sections with our own. */
+ sections with our own. We also want to set BFD flags for
+ all the built-in subspaces. */
if (!strcmp (pa_def_subspaces[i].name, "$CODE$") && !USE_ALIASES)
{
text_section = segment;
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, text_section,
+ bfd_set_section_flags (stdoutput, segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC | SEC_CODE
| SEC_READONLY
@@ -5639,7 +5649,7 @@ pa_spaces_begin ()
{
data_section = segment;
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, data_section,
+ bfd_set_section_flags (stdoutput, segment,
applicable & (SEC_ALLOC | SEC_LOAD
| SEC_RELOC
| SEC_HAS_CONTENTS));
@@ -5650,9 +5660,27 @@ pa_spaces_begin ()
{
bss_section = segment;
applicable = bfd_applicable_section_flags (stdoutput);
- bfd_set_section_flags (stdoutput, bss_section,
+ bfd_set_section_flags (stdoutput, segment,
applicable & SEC_ALLOC);
}
+ else if (!strcmp (pa_def_subspaces[i].name, "$LIT$") && !USE_ALIASES)
+ {
+ applicable = bfd_applicable_section_flags (stdoutput);
+ bfd_set_section_flags (stdoutput, segment,
+ applicable & (SEC_ALLOC | SEC_LOAD
+ | SEC_RELOC
+ | SEC_READONLY
+ | SEC_HAS_CONTENTS));
+ }
+ else if (!strcmp (pa_def_subspaces[i].name, "$UNWIND$") && !USE_ALIASES)
+ {
+ applicable = bfd_applicable_section_flags (stdoutput);
+ bfd_set_section_flags (stdoutput, segment,
+ applicable & (SEC_ALLOC | SEC_LOAD
+ | SEC_RELOC
+ | SEC_READONLY
+ | SEC_HAS_CONTENTS));
+ }
/* Find the space associated with this subspace. */
space = pa_segment_to_space (pa_def_spaces[pa_def_subspaces[i].