Apply H.J.'s patch to fix NOLOAD section sizes and dot updates
This commit is contained in:
parent
c5394b80ae
commit
cce4c4c5bd
2 changed files with 13 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2000-01-18 H.J. Lu <hjl@gnu.org>
|
||||||
|
|
||||||
|
* ldlang.c (lang_size_sections): Also update the current
|
||||||
|
address of a region if the SEC_NEVER_LOAD bit is not set.
|
||||||
|
|
||||||
2000-01-10 Philip Blundell <pb@futuretv.com>
|
2000-01-10 Philip Blundell <pb@futuretv.com>
|
||||||
|
|
||||||
* configure.tgt (arm*-*-conix*): New target.
|
* configure.tgt (arm*-*-conix*): New target.
|
||||||
|
|
11
ld/ldlang.c
11
ld/ldlang.c
|
@ -2823,10 +2823,15 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
|
||||||
/* Update dot in the region ?
|
/* Update dot in the region ?
|
||||||
We only do this if the section is going to be allocated,
|
We only do this if the section is going to be allocated,
|
||||||
since unallocated sections do not contribute to the region's
|
since unallocated sections do not contribute to the region's
|
||||||
overall size in memory. */
|
|
||||||
|
If the SEC_NEVER_LOAD bit is not set, it will affect the
|
||||||
|
addresses of sections after it. We have to update
|
||||||
|
dot. */
|
||||||
if (os->region != (lang_memory_region_type *) NULL
|
if (os->region != (lang_memory_region_type *) NULL
|
||||||
&& (bfd_get_section_flags (output_bfd, os->bfd_section)
|
&& ((bfd_get_section_flags (output_bfd, os->bfd_section)
|
||||||
& (SEC_ALLOC | SEC_LOAD)))
|
& SEC_NEVER_LOAD) == 0
|
||||||
|
|| (bfd_get_section_flags (output_bfd, os->bfd_section)
|
||||||
|
& (SEC_ALLOC | SEC_LOAD))))
|
||||||
{
|
{
|
||||||
os->region->current = dot;
|
os->region->current = dot;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue