From c446796d93b4ffce025433bf27471beefef7b5a7 Mon Sep 17 00:00:00 2001 From: Alex Unleashed Date: Sat, 8 Jul 2006 21:39:28 +0000 Subject: Add needed changes to get a working sandbox on FreeBSD Signed-off-by: Alex Unleashed Signed-off-by: Martin Schlemmer --- scripts/gen_symbol_header.awk | 9 +++++++++ scripts/gen_symbol_version_map.awk | 9 +++++++++ 2 files changed, 18 insertions(+) (limited to 'scripts') diff --git a/scripts/gen_symbol_header.awk b/scripts/gen_symbol_header.awk index 21852de..9d66d49 100644 --- a/scripts/gen_symbol_header.awk +++ b/scripts/gen_symbol_header.awk @@ -2,6 +2,10 @@ BEGIN { COUNT = split(ENVIRON["SYMBOLS"], SYMBOLS); } +/^ OS\/ABI:/ { + ABI = $NF +} + { # Unstripped libc's have '.symtab' section as well, and # we should stop processing when we hit that @@ -47,6 +51,11 @@ BEGIN { if (VERSIONED_LIBC && !symbol_array[2]) continue; + # Blacklist __getcwd on FreeBSD + # Unleashed - May 2006 + if ((symbol_array[1] == "__getcwd") && (ABI == "FreeBSD")) + continue; + # We have a versioned libc if (symbol_array[2] && !VERSIONED_LIBC) VERSIONED_LIBC = 1; diff --git a/scripts/gen_symbol_version_map.awk b/scripts/gen_symbol_version_map.awk index 260933f..1423514 100644 --- a/scripts/gen_symbol_version_map.awk +++ b/scripts/gen_symbol_version_map.awk @@ -2,6 +2,10 @@ BEGIN { split(ENVIRON["SYMBOLS"], SYMBOLS); } +/^ OS\/ABI:/ { + ABI = $NF +} + { # Unstripped libc's have '.symtab' section as well, and # we should stop processing when we hit that @@ -51,6 +55,11 @@ BEGIN { if (VERSIONED_LIBC && !symbol_array[2]) continue; + # Blacklist __getcwd on FreeBSD + # Unleashed - May 2006 + if ((symbol_array[1] == "__getcwd") && (ABI == "FreeBSD")) + continue; + # Handle non-versioned libc's like uClibc ... if (!symbol_array[2]) symbol_array[2] = ""; -- cgit v1.2.3-65-gdbad