Skip to content

riscv-rt: Prune unused symbols #155

@piegamesde

Description

@piegamesde

I'm trying to optimize my binary size. For this, I override all default functions that I don't need with stubs. However, most of these symbols are still present in my binary. Is there a way to get rid of them?

As far as I can tell, using weak symbols could resolve this, but I don't know much about linking. (Incomplete) list of symbols that I'd like to get rid of:

  • __wfi
  • __read_mhartid
  • __read_mcause
  • default_mp_hook
  • DefaultExceptionHandler
  • DefaultInterruptHandler
  • default_setup_interrupts
  • default_start_trap

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