Skip to content

Replace _init and _fini references in pc-linux PSP #309

@ghost

Description

Describe the bug
When compiling the cFS main pc-linux target for Ubuntu 21.04 on RISC-V, the build fails with undefined references to the "_init" and "_fini" symbols. These symbols are used by the PSP to get the cFE core text segment addresses. The build works on Ubuntu 21.04 Aarch64.
These symbols are deprecated on all targets and only still exist on the x86 and ARM targets to support legacy software. The RISC-V target does not include them.
We can replace them with other symbols such as: __executable_start for _init, and __etext for _fini.

To Reproduce
Just build the main branch of cFS on Ubuntu 21.04 on RISC-V. I am using the SiFive HiFive Unleashed board, but QEMU can also be used.

System observed on:

  • SiFive HiFive Unleashed board
  • OS: Ubuntu 21.04 server
  • Versions: main branch (as of 9/14/2021)

Reporter Info
Alan Cudmore/NASA GSFC

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