parent
2c94c6f8e8
commit
bcd89dd34c
|
@ -1,6 +1,6 @@
|
|||
PHDRS
|
||||
{
|
||||
text PT_LOAD ;
|
||||
text PT_LOAD ;
|
||||
rodata PT_LOAD ;
|
||||
dynamic PT_DYNAMIC ;
|
||||
}
|
||||
|
@ -10,11 +10,6 @@ SECTIONS
|
|||
. = SIZEOF_HEADERS;
|
||||
.text : { *(.text*) } :text
|
||||
.rodata : { *(.rodata*) } :rodata
|
||||
.data.rel.ro : { *(.data.rel.ro*) } :rodata
|
||||
.dynamic : { *(.dynamic) } :dynamic
|
||||
.data.rel.ro : { *(.data.rel.ro*) } :dynamic
|
||||
.dynsym : { *(.dynsym) } :dynamic
|
||||
.dynstr : { *(.dynstr) } :dynamic
|
||||
.gnu.hash : { *(.gnu.hash) } :dynamic
|
||||
.rel.dyn : { *(.rel.dyn) } :dynamic
|
||||
.hash : { *(.hash) } :dynamic
|
||||
}
|
||||
|
|
|
@ -7,17 +7,17 @@ source "$bpf_sdk"/env.sh
|
|||
so=$1
|
||||
dump=$2
|
||||
if [[ -z $so ]] || [[ -z $dump ]]; then
|
||||
echo "Usage: $0 bpf-program.so dump.txt"
|
||||
echo "Usage: $0 bpf-program.so dump.txt" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -r $so ]]; then
|
||||
echo "Error: File not found or readable: $so"
|
||||
echo "Error: File not found or readable: $so" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! command -v rustfilt > /dev/null; then
|
||||
echo "Error: rustfilt not found. It can be installed by running: cargo install rustfilt"
|
||||
echo "Error: rustfilt not found. It can be installed by running: cargo install rustfilt" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -38,8 +38,9 @@ dump_mangled=$dump.mangled
|
|||
rm -f "$dump_mangled"
|
||||
|
||||
if [[ ! -f "$dump" ]]; then
|
||||
echo "Error: Failed to create $dump"
|
||||
echo "Error: Failed to create $dump" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Wrote $dump"
|
||||
echo >&2
|
||||
echo "Wrote $dump" >&2
|
||||
|
|
Loading…
Reference in New Issue