mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-18 08:38:10 +08:00
From Wally Iimura <iimura@microunity.com>:
* ldlang.c (lang_size_sections): When checking whether an address is within a region, don't get confused by wrapping around at the end of the address space.
This commit is contained in:
@ -1,3 +1,10 @@
|
|||||||
|
1999-08-09 Ian Lance Taylor <ian@zembu.com>
|
||||||
|
|
||||||
|
From Wally Iimura <iimura@microunity.com>:
|
||||||
|
* ldlang.c (lang_size_sections): When checking whether an address
|
||||||
|
is within a region, don't get confused by wrapping around at the
|
||||||
|
end of the address space.
|
||||||
|
|
||||||
1999-08-08 Ian Lance Taylor <ian@zembu.com>
|
1999-08-08 Ian Lance Taylor <ian@zembu.com>
|
||||||
|
|
||||||
* ldlang.c (wild_doit): Update for renaming of SEC_SHORT to
|
* ldlang.c (wild_doit): Update for renaming of SEC_SHORT to
|
||||||
|
12
ld/ldlang.c
12
ld/ldlang.c
@ -2744,10 +2744,18 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
|
|||||||
{
|
{
|
||||||
os->region->current = dot;
|
os->region->current = dot;
|
||||||
|
|
||||||
/* Make sure this isn't silly. */
|
/* Make sure the new address is within the region. We
|
||||||
if (os->region->current < os->region->origin
|
explicitly permit the current address to be at the
|
||||||
|
exact end of the region when the VMA is non-zero,
|
||||||
|
in case the region is at the end of addressable
|
||||||
|
memory and the calculation wraps around. */
|
||||||
|
if ((os->region->current < os->region->origin
|
||||||
|| (os->region->current - os->region->origin
|
|| (os->region->current - os->region->origin
|
||||||
> os->region->length))
|
> os->region->length))
|
||||||
|
&& ((os->region->current
|
||||||
|
!= os->region->origin + os->region->length)
|
||||||
|
|| os->bfd_section->vma == 0))
|
||||||
|
|
||||||
{
|
{
|
||||||
if (os->addr_tree != (etree_type *) NULL)
|
if (os->addr_tree != (etree_type *) NULL)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user