bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/12484] avr-ld doesn't warn when a memory section is over


From: s.pitchumani at gmail dot com
Subject: [Bug ld/12484] avr-ld doesn't warn when a memory section is over
Date: Mon, 12 Jun 2017 07:32:48 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=12484

Pitchumani <s.pitchumani at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |s.pitchumani at gmail dot com

--- Comment #1 from Pitchumani <s.pitchumani at gmail dot com> ---
IMO, linker script should have been changed,

from:
  .data   : AT (ADDR (.text) + SIZEOF (.text))                                  
   {
      PROVIDE (__data_start = .) ;
     *(.data) 
     *(.data*)
     *(.rodata)  /* We need to include .rodata here if gcc is used */
     *(.rodata*) /* with -fdata-sections.  */
     *(.gnu.linkonce.d*)
     . = ALIGN(2);
      _edata = . ;
      PROVIDE (__data_end = .) ;
   }  > data

to:
  .data   : 
   {
      PROVIDE (__data_start = .) ;
     *(.data) 
     *(.data*)
     *(.rodata)  /* We need to include .rodata here if gcc is used */
     *(.rodata*) /* with -fdata-sections.  */
     *(.gnu.linkonce.d*)
     . = ALIGN(2);
      _edata = . ;
      PROVIDE (__data_end = .) ;
   }  > data AT> text

This way linker knows from which region the .data to be loaded, and finds
overflow correctly.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]