Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsel4test: retain _test_type and _test_case sections
unused attribute does not prevent the sections from being garbage-collected during link-time optimisation. This may trigger undefined references errors to [__start|__stop]_test_case symbols that are expected to be emitted by the linker anyway. Adding "retain" attribute makes sure that the section and its associated symbols are kept regardless of linker's garbage collection. Another fix could be adding "nostart-stop-gc" to the linker flags, but since it is only one section (_test_case) where its __start/__stop symbols are references, adding retain to it makes more sense. This additional functionality requires binutils version 2.36 or later. Sponsored by: DARPA. Signed-off-by: Hesham Almatary <hesham.almatary@cl.cam.ac.uk>
- Loading branch information