[PATCH] ld: pru: Place exception-handling sections correctly

Nick Clifton nickc@redhat.com
Thu May 4 11:43:59 GMT 2023


Hi Dimitar,

> A recent GCC commit [1] exposed a latent bug in the PRU default linker
> script. The exception-handling sections were not described in the linker
> script. When GCC started outputting read-only EH sections, their
> contents would erroneously be placed in the instruction memory (IMEM),
> which in turn is not readable at runtime. Thus any access to the
> read-only exception-handling data results in a runtime crash.
> 
> Fix by declaring the EH output sections. Do not split in read-only and
> read-write sections because PRU has no true support for rodata. It has
> only one memory for data (DMEM).

Patch approved and applied.

Note - I extended the ChangeLog entry to also mention the updated to the
.data and .resource_table sections.

Cheers
   Nick



More information about the Binutils mailing list