test/nlist.c


Log

Author Commit Date CI Message
Victor Westerhuis 2716dfd0 2021-11-26T20:24:20 test: Explicitly mark symbols as used Because some of the symbols are not otherwise referenced, GCC would like to remove them. Closes: !14 Signed-off-by: Guillem Jover <guillem@hadrons.org>
Guillem Jover 25e88f64 2021-03-02T00:48:31 test: Cast literal strings to (char *) on n_name assignment The member is declared as n_name so we cannot directly assign a literal string constant. Warned-by: gcc
James Clarke 61d378f5 2019-02-03T00:11:15 Re-allow direct use of nlist.n_name in <nlist.h> Commit e8d340de ("Remove a.out support from nlist()") introduced a copy of the definition of nlist from a.out.h. However, as well as having n_name inside n_un, on the various BSDs n_name could also be accessed as a direct member of nlist, and this is made use of by FreeBSD's usr.bin/netstat/main.c. Thus we should also add the same enclosing anonymous union. [guillem@hadrons.org: - Add a minimal unit test. ] Closes: !4 Signed-off-by: Guillem Jover <guillem@hadrons.org>
Jason Duerstock 9ceac74e 2017-12-03T16:50:07 test: Fix nlist(3) unit test on IA64 On IA64 this is only the case in the ELF binary, but it gets normalized when loaded at run-time. Fixes: https://bugs.debian.org/881611 Signed-off-by: Guillem Jover <guillem@hadrons.org>
Guillem Jover 3b2b7938 2017-06-25T01:51:30 test: Fix nlist() unit test on IA64 and PowerPC 64-bit ELFv1 At least on IA64 and PowerPC 64-bit ELFv1, the functions are stored in the .text sections but they are accessed through a function descriptor stored in a data section, for example for PowerPC 64-bit ELFv1 that section is called .opd. We should take this into account when checking the n_type for the functions we have requested information from nlist(). Rationale-by: James Clarke <jrtc27@jrtc27.com>
Guillem Jover c4e58c09 2017-06-19T21:41:13 test: Remove unused variable in nlist() unit test
Guillem Jover 922eff5c 2017-06-14T01:52:12 test: Add new nlist() unit test