mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-31 22:04:12 +08:00
* 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.
This commit is contained in:
@ -153,6 +153,12 @@ frag_more (nchars)
|
|||||||
{
|
{
|
||||||
register char *retval;
|
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)
|
if (mri_common_symbol != NULL)
|
||||||
{
|
{
|
||||||
as_bad ("attempt to allocate data in common section");
|
as_bad ("attempt to allocate data in common section");
|
||||||
@ -288,6 +294,8 @@ frag_align_pattern (alignment, fill_pattern, n_fill)
|
|||||||
int
|
int
|
||||||
frag_now_fix ()
|
frag_now_fix ()
|
||||||
{
|
{
|
||||||
|
if (now_seg == absolute_section)
|
||||||
|
return abs_section_offset;
|
||||||
return (char*)obstack_next_free (&frags) - frag_now->fr_literal;
|
return (char*)obstack_next_free (&frags) - frag_now->fr_literal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user