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.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to