This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: binutils 2.18 issue with ld on 68hc11/68hc12 port


On Mon, Mar 24, 2008 at 02:46:26PM +0000, James Murray wrote:
> After some digging, I have narrowed the "problem" down to these two
> patches. binutils from the 25th has no error, after these patches it
> gives the error. However, I don't understand why or what to do about it.
> 
> 2006-07-26  Alan Modra  <amodra@bigpond.net.au>
> 
>         * emultempl/elf-generic.em (map_segments): Reorganise loop so
> that
>         layout happens before segment map.  Don't do segment map on
>         relocatable link.
> 
> 2006-07-26  Alan Modra  <amodra@bigpond.net.au>
> 
>         * ldexp.c (fold_name <LOADADDR>): Use the lma.
>         * ldlang.h (lang_memory_region_type): Delete old_length.  Add
>         last_os.
>         * ldlang.c (lang_memory_region_lookup): Init new field.
>         (lang_reset_memory_regions): Reset new field.
>         (lang_insert_orphan): Don't set load_base.
>         (lang_leave_overlay): Likewise.
>         (lang_size_sections_1): Delete unnecessary code setting
> lma_region
>         to region.  Correct lma region check.
>         (lang_do_assignments_1): Rename output_section_statement parm
>         to current_os.  Set lma from previous section in region.
> 
>         * ldlang.c: Formatting.
> 

>From my Linux binutils release note:

---
Starting from the 2.17.50.0.4 release, the default output section LMA
(load memory address) has changed for allocatable sections from being
equal to VMA (virtual memory address), to keeping the difference
between
LMA and VMA the same as the previous output section in the same region.

For

.data.init_task : { *(.data.init_task) }

LMA of .data.init_task section is equal to its VMA with the old linker.
With the new linker, it depends on the previous output section. You
can use

.data.init_task : AT (ADDR(.data.init_task)) { *(.data.init_task) }

to ensure that LMA of .data.init_task section is always equal to its
VMA. The linker script in the older 2.6 x86-64 kernel depends on the
old behavior.  You can add AT (ADDR(section)) to force LMA of
.data.init_task section equal to its VMA. It will work with both old
and new linkers. The x86-64 kernel linker script in kernel 2.6.13 and
above is OK.
---

I don't know if it applies to you.


H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]