Skip to content

elfloader: issues with Arm's linker script #172

@heshamelmatary

Description

@heshamelmatary

The shared Arm's linker script includes some sections and directive that might not be necessary. For example, .interp and .hash here:

SECTIONS { .interp : { *(.interp) } } INSERT BEFORE .hash;

What's the reason this section exists in the elfloader, and why the INSERT BEFORE .hash? I am able to remove them and ELF linking works just fine. However, when building with LLVM/lld, they trigger a linking error as .hash and .interp don't exist.

aarch64-none-elf-ld.lld: error: unable to insert .interp before .hash aarch64-none-elf-ld.lld: error: unable to insert ._archive_cpio after .eh_frame

Similarly, INSERT AFTER .eh_frame;

I do have local fixes that remove them, I'd be happy to submit a PR if there's no good reason those sections/directives exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions