Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Adding -emit-relocs for use with Post-Build tools. #5986

Copy link
Copy link
@IridescentRose

Description

@IridescentRose
Issue body actions

Hello! I am currently developing a wrapper of the PSP Toolchain for Zig, in order to be able to develop using Zig on the Sony PlayStation Portable. Currently I aim to use no external dependencies. The last external dependency to resolve is LLD.

In order to satisfy post-build tools for this platform, users need relocation sections in the final built ELF file (in order to reformat into Sony's proprietary loading specifications). I have all of my building through a build.zig script and use LLD for the -emit-relocs flag, which is the only flag missing from zig's default linking options. Since zig internally uses LLD, I believe it would be logical to nix this requirement by using a linker flag.

-emit-relocs is an option which allows the emission of relocation sections for use by post-build tools. This might also be a useful feature for other targets such as ARM Embedded Consoles such as GBA, DS, and 3DS that would likely have similar tools required.

The goal is to be able to work with the user only having the zig compiler and linker available, and simply just including the toolchain in their project with no externals. Seeing that it's one flag, I would like to propose adding -emit-relocs as a conditional flag, and I'm happy to create a patch like what was done in #3981.

Let me know your thoughts, and I'd be happy to continue this discussion.

Reactions are currently unavailable

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.