Skip to content

Add a -C no-gc-sections option to rustc #17141

Closed
@jansegre

Description

@jansegre

I have an issue when static linking to an external library on OS X 64-bit (in my case luajit) that is known to have problems when -dead_strip is passed to the linker due to some code being written in asm. A brief talk in the IRC lead to @cmr suggesting me to open this issue. The name no-gc-sections is for matching the gnu ld --gc-sections nomenclature.

I'm keeping it brief I can give more details if requested.
Edit: PS: I'm manually linking as temporary fix.

Activity

added
C-enhancementCategory: An issue proposing an enhancement or a PR with one.
on Feb 2, 2016
steveklabnik

steveklabnik commented on Feb 2, 2016

@steveklabnik
Member

Triage: no change

pnkfelix

pnkfelix commented on Apr 4, 2016

@pnkfelix
Member

-C link-dead-code covers this at this point, I think. At least, the way its implemented is that it causes the compiler to stop including --gc-sections in its linker invocation.

alexcrichton

alexcrichton commented on Apr 4, 2016

@alexcrichton
Member

Indeed!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @steveklabnik@alexcrichton@pnkfelix@jansegre

        Issue actions

          Add a `-C no-gc-sections` option to rustc · Issue #17141 · rust-lang/rust