https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89269

--- Comment #7 from Pharos Team <rtos.pharos at outlook dot com> ---
Just an additional note to anyone who might have the same problem, I solved it
with:

 /******************************************************************/
  /*              Start of text and read-only data area             */
  /******************************************************************/
  .text :
  {
    CREATE_OBJECT_SYMBOLS

    /* source code is in text section */
    pharosStartText = .;

    KEEP(*(.textStart))
    KEEP(*(.textStart.*))

    . = ALIGN (0x4);
    *(.text)
    *(.text.*)

    /* read-only data is placed in text */
    . = ALIGN (0x10);
    pharosRodataStart = . ;
    *(.srodata)
    *(.srodata.*)
    *(.rodata)
    *(.rodata.*)
    *(.note.gnu.build-id)
    *(.note.gnu.build-id.*)
    pharosRodataEnd = .;

    /* variable to check the end of the text section */
    . = ALIGN (0x10);
    _endtext = .;
    pharosEndText = .;
  } > sdram


That is, placing *(.srodata) solved it (the constant variable was being placed
at .srodata instead of .rodata)

Regards,
Pharos team

Reply via email to