View Single Post
Old 07 June 2022, 20:15   #8
hop
Registered User
 
Join Date: Apr 2019
Location: UK
Posts: 209
Spotted a bug in the linker script. It needed a * after the "chip" as well in the chip section so it reads:
*(*chip*)
. Without this, it was not pulling in sections with generated names like "codechip0001"

Code:
PHDRS {
    fast PT_LOAD;
    chip PT_LOAD;
}

SECTIONS {
    . = 0x400;
    .chip: {
        *(*chip*)
        . = ALIGN(2);
        _FREECHIP = .;
    } :chip

    . = 0x100000;
    .text: { *(code*) } :fast
    .data: { *(data*) }
    .sdata: {
        _LinkerDB = . + 0x7ffe;
        _SDA_BASE_ = . + 0x7ffe;
        *(.sdata __MERGED)
    }
    .bss: { *(bss*) }
}
However this now results in:

Warning 22: Attributes of section .chip were changed from r-x- to rwx- in hunk_to_rawseg_loadfile.
hop is offline  
 
Page generated in 0.05090 seconds with 10 queries