* ldlang.c (lang_size_sections): Adjust current region address
even for sections with an explicit address. From ralphc@pyramid.com (Ralph Campbell).
This commit is contained in:
parent
66f2c66f93
commit
686739e2c6
@ -1,5 +1,9 @@
|
|||||||
Wed Jun 22 13:42:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
Wed Jun 22 13:42:14 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
|
||||||
|
|
||||||
|
* ldlang.c (lang_size_sections): Adjust current region address
|
||||||
|
even for sections with an explicit address. From
|
||||||
|
ralphc@pyramid.com (Ralph Campbell).
|
||||||
|
|
||||||
* emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0.
|
* emulparams/i386linux.sh (NONPAGED_TEXT_START_ADDR): Set to 0.
|
||||||
From jrs@world.std.com (Rick Sladkey).
|
From jrs@world.std.com (Rick Sladkey).
|
||||||
|
|
||||||
|
23
ld/ldlang.c
23
ld/ldlang.c
@ -410,7 +410,7 @@ lang_init ()
|
|||||||
(char *) NULL);
|
(char *) NULL);
|
||||||
abs_output_section = lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME);
|
abs_output_section = lang_output_section_statement_lookup (BFD_ABS_SECTION_NAME);
|
||||||
|
|
||||||
abs_output_section->bfd_section = &bfd_abs_section;
|
abs_output_section->bfd_section = bfd_abs_section_ptr;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1617,10 +1617,10 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (os->bfd_section == &bfd_abs_section)
|
if (bfd_is_abs_section (os->bfd_section))
|
||||||
{
|
{
|
||||||
/* No matter what happens, an abs section starts at zero */
|
/* No matter what happens, an abs section starts at zero */
|
||||||
bfd_set_section_vma (0, os->bfd_section, 0);
|
ASSERT (os->bfd_section->vma == 0);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1664,11 +1664,10 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
|
|||||||
os->bfd_section->lma
|
os->bfd_section->lma
|
||||||
= exp_get_value_int(os->load_base, 0,"load base", lang_final_phase_enum);
|
= exp_get_value_int(os->load_base, 0,"load base", lang_final_phase_enum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
os->bfd_section->output_offset = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
os->bfd_section->output_offset = 0;
|
|
||||||
|
|
||||||
(void) lang_size_sections (os->children.head, os, &os->children.head,
|
(void) lang_size_sections (os->children.head, os, &os->children.head,
|
||||||
os->fill, dot, relax);
|
os->fill, dot, relax);
|
||||||
/* Ignore the size of the input sections, use the vma and size to */
|
/* Ignore the size of the input sections, use the vma and size to */
|
||||||
@ -1679,13 +1678,15 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
|
|||||||
/* The coercion here is important, see ld.h. */
|
/* The coercion here is important, see ld.h. */
|
||||||
(bfd_vma) os->block_value);
|
(bfd_vma) os->block_value);
|
||||||
|
|
||||||
os->bfd_section->_raw_size = after - os->bfd_section->vma;
|
if (bfd_is_abs_section (os->bfd_section))
|
||||||
|
ASSERT (after == os->bfd_section->vma);
|
||||||
|
else
|
||||||
|
os->bfd_section->_raw_size = after - os->bfd_section->vma;
|
||||||
dot = os->bfd_section->vma + os->bfd_section->_raw_size;
|
dot = os->bfd_section->vma + os->bfd_section->_raw_size;
|
||||||
os->processed = true;
|
os->processed = true;
|
||||||
|
|
||||||
/* Replace into region ? */
|
/* Replace into region ? */
|
||||||
if (os->addr_tree == (etree_type *) NULL
|
if (os->region != (lang_memory_region_type *) NULL)
|
||||||
&& os->region != (lang_memory_region_type *) NULL)
|
|
||||||
{
|
{
|
||||||
os->region->current = dot;
|
os->region->current = dot;
|
||||||
/* Make sure this isn't silly */
|
/* Make sure this isn't silly */
|
||||||
@ -2806,7 +2807,7 @@ lang_abs_symbol_at_beginning_of (secname, name)
|
|||||||
else
|
else
|
||||||
h->u.def.value = bfd_get_section_vma (output_bfd, sec);
|
h->u.def.value = bfd_get_section_vma (output_bfd, sec);
|
||||||
|
|
||||||
h->u.def.section = &bfd_abs_section;
|
h->u.def.section = bfd_abs_section_ptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2841,7 +2842,7 @@ lang_abs_symbol_at_end_of (secname, name)
|
|||||||
h->u.def.value = (bfd_get_section_vma (output_bfd, sec)
|
h->u.def.value = (bfd_get_section_vma (output_bfd, sec)
|
||||||
+ bfd_section_size (output_bfd, sec));
|
+ bfd_section_size (output_bfd, sec));
|
||||||
|
|
||||||
h->u.def.section = &bfd_abs_section;
|
h->u.def.section = bfd_abs_section_ptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user