customize linker script fail when use gold linker

Fangrui Song i@maskray.me
Fri May 14 07:33:05 GMT 2021


On 2021-05-14, 陈云星 via Binutils wrote:
>Hi, folks:
>
>I’m migrating from bfd linker to gold linker.
>
>And my project has custom linker script:
>
>====================================
>SECTIONS
>{
>  memory_context_static_id :
>  {
>    KEEP(*(SORT(memory_context_static_id*)));
>  }
>  co_buffer :
>  {
>    KEEP(*(*CO_BUFFER_BEGIN*))
>    KEEP(*(*COBUFFER*))
>    KEEP(*(*CO_BUFFER_END*))
>  }
>  co_hook :
>  {
>    KEEP(*(*CO_HOOK_BEGIN*))
>    KEEP(*(*COHOOK*))
>    KEEP(*(*CO_HOOK_END*))
>  }
>}
>INSERT AFTER .text;
>====================================
>
>when I migrate to gold linker, it failed with gold don’t recognize ‘INSERT’;

gold doesn't support INSERT [BEFORE|AFTER].


More information about the Binutils mailing list