Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ghost opened this issue Sep 15, 2021 · 1 comment
Open

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

ghost opened this issue Sep 15, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 15, 2021

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

@SterlingPeet
Copy link

I have made this change in my fork and it appears to work for Ubuntu 22.04, on both RISC-V and ARM. This was tested on hardware using the slurm-scheduled github actions technique I presented at FSW 2024, hosted by SwRI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant