nasa / PSP

The Core Flight System (cFS) Platform Support Package (PSP)
Apache License 2.0
68 stars 56 forks source link

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

Open ghost opened 3 years ago

ghost commented 3 years ago

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:

Reporter Info Alan Cudmore/NASA GSFC

SterlingPeet commented 4 months ago

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.