
libsframe is a library that allows you to: - decode a .sframe section - probe and inspect a .sframe section - encode (and eventually write) a .sframe section. This library is currently being used by the linker, readelf, objdump. This library will also be used by the SFrame unwinder which is still to be upstream'd. The file include/sframe-api.h defines the user-facing APIs for decoding, encoding and probing .sframe sections. A set of error codes together with their error message strings are also defined. Endian flipping is performed automatically at read and write time, if cross-endianness is detected. ChangeLog: * Makefile.def: Add libsframe as new module with its dependencies. * Makefile.in: Regenerated. * binutils/Makefile.am: Add libsframe. * binutils/Makefile.in: Regenerated. * configure: Regenerated * configure.ac: Add libsframe to host_libs. * libsframe/Makefile.am: New file. * libsframe/Makefile.in: New file. * libsframe/aclocal.m4: New file. * libsframe/config.h.in: New file. * libsframe/configure: New file. * libsframe/configure.ac: New file. * libsframe/sframe-error.c: New file. * libsframe/sframe-impl.h: New file. * libsframe/sframe.c: New file. include/ChangeLog: * sframe-api.h: New file. testsuite/ChangeLog: * libsframe/testsuite/Makefile.am: New file. * libsframe/testsuite/Makefile.in: Regenerated. * libsframe/testsuite/libsframe.decode/Makefile.am: New file. * libsframe/testsuite/libsframe.decode/Makefile.in: Regenerated. * libsframe/testsuite/libsframe.decode/decode.exp: New file. * libsframe/testsuite/libsframe.encode/Makefile.am: Likewise. * libsframe/testsuite/libsframe.encode/Makefile.in: Regenerated. * libsframe/testsuite/libsframe.encode/encode.exp: New file. * libsframe/testsuite/libsframe.encode/encode-1.c: Likewise. * libsframe/testsuite/libsframe.decode/be-flipping.c: Likewise. * libsframe/testsuite/libsframe.decode/frecnt-1.c: Likewise. * libsframe/testsuite/libsframe.decode/frecnt-2.c: Likewise. * libsframe/testsuite/libsframe.decode/DATA-BE: New file. * libsframe/testsuite/libsframe.decode/DATA1: Likewise. * libsframe/testsuite/libsframe.decode/DATA2: Likewise.
50 lines
1.6 KiB
Text
50 lines
1.6 KiB
Text
# Copyright (C) 2022 Free Software Foundation, Inc.
|
|
#
|
|
# This file is part of the GNU Binutils.
|
|
#
|
|
# This program is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program; if not, write to the Free Software
|
|
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
|
|
# MA 02110-1301, USA.
|
|
#
|
|
|
|
load_lib dejagnu.exp
|
|
|
|
# Run the tests only if compatible dejagnu gcc pair is found
|
|
if [string equal $COMPAT_DEJAGNU "no"] {
|
|
verbose -log "SFrame testsuite needs perhaps a more recent DejaGnu"
|
|
unsupported be-flipping
|
|
unsupported frecnt-1
|
|
unsupported frecnt-2
|
|
return;
|
|
}
|
|
|
|
catch "exec ln -s $srcdir/libsframe.decode/DATA1 ." status
|
|
catch "exec ln -s $srcdir/libsframe.decode/DATA2 ." status
|
|
catch "exec ln -s $srcdir/libsframe.decode/DATA-BE ." status
|
|
|
|
if { [host_execute "testsuite/libsframe.decode/be-flipping"] ne "" } {
|
|
fail "be-flipping"
|
|
}
|
|
|
|
if { [host_execute "testsuite/libsframe.decode/frecnt-1"] ne "" } {
|
|
fail "frecnt-1"
|
|
}
|
|
|
|
if { [host_execute "testsuite/libsframe.decode/frecnt-2"] ne "" } {
|
|
fail "frecnt-2"
|
|
}
|
|
|
|
catch "exec rm DATA1" status
|
|
catch "exec rm DATA2" status
|
|
catch "exec rm DATA-BE" status
|