diff --git a/libsandbox/trace.c b/libsandbox/trace.c index 1e34924..aad3fd5 100644 --- a/libsandbox/trace.c +++ b/libsandbox/trace.c @@ -32,7 +32,7 @@ pid_t trace_pid; # error "unable to find struct for tracing regs" #endif -#ifdef HAVE_OPEN64 +#if defined(HAVE_OPEN64) && !defined(open64) # define sb_openat_pre_check sb_openat64_pre_check #endif diff --git a/scripts/gen_symbol_header.awk b/scripts/gen_symbol_header.awk index c9af7f9..4abf4ca 100644 --- a/scripts/gen_symbol_header.awk +++ b/scripts/gen_symbol_header.awk @@ -17,7 +17,7 @@ BEGIN { # On x86, x86_64 and others, $8 is the symbol name, but on # alpha, its $10, so rather use $NF, as it should be the # last field - if ($NF ~ sym_regex) { + if (($5 != "WEAK") && ($NF ~ sym_regex)) { split($NF, symbol_array, /@|@@/); # Don't add local symbols of versioned libc's diff --git a/scripts/gen_symbol_version_map.awk b/scripts/gen_symbol_version_map.awk index a0a43c0..32c4b0d 100644 --- a/scripts/gen_symbol_version_map.awk +++ b/scripts/gen_symbol_version_map.awk @@ -14,7 +14,7 @@ BEGIN { # Only check FUNCtion symbols which are not LOCAL, or # do not have DEFAULT visibility - if ($4 != "FUNC" || $5 == "LOCAL" || $6 != "DEFAULT") + if ($4 != "FUNC" || $5 == "LOCAL") next; for (x in SYMBOLS) {