Commit 809abaff by Loren J. Rittle Committed by Loren J. Rittle

* testsuite/abi_check.cc: Support older binutils/readelf.

From-SVN: r56530
parent 1f8151cf
2002-08-22 Loren J. Rittle <ljrittle@acm.org>
* testsuite/abi_check.cc: Enhance shell portability.
Support older binutils/readelf.
* config/abi/i386-unknown-freebsd4.6: Add.
* config/abi/i386-unknown-freebsd4.6/baseline_symbols.txt: New file.
......
......@@ -236,8 +236,16 @@ int main(int argc, char** argv)
*/
const char quote = '"';
const char bslash = '\\';
// GNU binutils, somewhere after version 2.11.2, requires -W/--wide
// to avoid default line truncation. -W is not supported and
// truncation did not occur by default before that point.
bool readelf_need_wide =
(system("readelf --help | grep -- --wide >/dev/null") == 0);
ostringstream cmd;
cmd << "readelf -s -W " << test_lib << " | sed '/" << bslash
cmd << "readelf -s " << (readelf_need_wide ? "-W " : "")
<< test_lib << " | sed '/" << bslash
<< ".dynsym/,/^$/p;d' | egrep -v ' (LOCAL|UND) ' | "
<< "awk '{ if ($4 == " << quote << "FUNC" << quote << "|| $4 == "
<< quote << "NOTYPE" << quote << ") printf " << quote << "%s:%s"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment