test: make T0 harness results complete
This commit is contained in:
@@ -23,8 +23,9 @@
|
||||
* small pins the headers-fit-page path stays correct and byte-identical.
|
||||
*
|
||||
* Generates the dyn-sym set from `nm -D <libc>` (default-versioned text
|
||||
* exports) so it adapts to whatever glibc is present; skips (passing) when
|
||||
* libc / nm are unavailable or too few symbols to overflow the first page.
|
||||
* exports) so it adapts to whatever glibc is present; reports the harness
|
||||
* skip status when libc / nm are unavailable or too few symbols are available
|
||||
* to overflow the first page.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -87,14 +88,14 @@ main(void)
|
||||
if (access("/usr/lib/libc.so.6", 0) == 0) { libc = "/usr/lib/libc.so.6"; libdir = "/usr/lib"; }
|
||||
else if (access("/lib/x86_64-linux-gnu/libc.so.6", 0) == 0) { libc = "/lib/x86_64-linux-gnu/libc.so.6"; libdir = "/lib/x86_64-linux-gnu"; }
|
||||
else if (access("/lib64/libc.so.6", 0) == 0) { libc = "/lib64/libc.so.6"; libdir = "/lib64"; }
|
||||
if (!libc) { puts("dynentry: no libc.so.6 — skipping"); return 0; }
|
||||
if (!libc) { puts("dynentry: no libc.so.6 — skipping"); return 77; }
|
||||
|
||||
static char syms[200][32];
|
||||
int ns = harvest_syms(libc, syms, 200);
|
||||
if (ns < 130) {
|
||||
printf("dynentry: only %d libc syms harvested (<130, can't overflow "
|
||||
"first page) — skipping\n", ns);
|
||||
return 0;
|
||||
return 77;
|
||||
}
|
||||
|
||||
const char *bin = getenv("BIN");
|
||||
|
||||
Reference in New Issue
Block a user