aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>1995-08-09 19:33:17 +0000
committerIan Lance Taylor <ian@airs.com>1995-08-09 19:33:17 +0000
commita2acbf8d1255d444439c9d5cc79ce73dbcf4db4c (patch)
tree9849793bfd341eb1b3ee4f3f803801f0fe9a536d
parent27a53b88d713381cd5abbb8c5aca0b36c864010e (diff)
downloadgdb-a2acbf8d1255d444439c9d5cc79ce73dbcf4db4c.zip
gdb-a2acbf8d1255d444439c9d5cc79ce73dbcf4db4c.tar.gz
gdb-a2acbf8d1255d444439c9d5cc79ce73dbcf4db4c.tar.bz2
* frags.c (frag_more): Warn if in absolute_section.
(frag_now_fix): In absolute_section, return abs_section_offset. * subsegs.c (subseg_change): If switching to absolute_section, just set now_seg and now_subseg. (subseg_set_rest): Special handling when switching to or from absolute_section.
-rw-r--r--gas/frags.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gas/frags.c b/gas/frags.c
index f52692e..eef042e 100644
--- a/gas/frags.c
+++ b/gas/frags.c
@@ -153,6 +153,12 @@ frag_more (nchars)
{
register char *retval;
+ if (now_seg == absolute_section)
+ {
+ as_bad ("attempt to allocate data in absolute section");
+ subseg_set (text_section, 0);
+ }
+
if (mri_common_symbol != NULL)
{
as_bad ("attempt to allocate data in common section");
@@ -288,6 +294,8 @@ frag_align_pattern (alignment, fill_pattern, n_fill)
int
frag_now_fix ()
{
+ if (now_seg == absolute_section)
+ return abs_section_offset;
return (char*)obstack_next_free (&frags) - frag_now->fr_literal;
}