Changeset 2422

Show
Ignore:
Timestamp:
09/29/07 20:32:18 (1 year ago)
Author:
taj
Message:

* relaytool: When multi-linking, use the first SONAME passed to --multilink as the name to use for the _is_present variable and _symbol_is_present function. Fixes #37.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apbuild/trunk/ChangeLog

    r2420 r2422  
     1Sun Sep 30 00:29:13 UTC 2007  Taj Morton  <tajmorton@gmail.com> 
     2        * relaytool: When multi-linking, use the first SONAME passed to --multilink 
     3          as the name to use for the _is_present variable and _symbol_is_present function. 
     4          Fixes #37. 
     5 
    16Sat Sep 22 02:39:11 UTC 2007  Taj Morton  <tajmorton@gmail.com> 
    27        * relaytool: Add --out-dir feature by user 'res' in ticket #50. 
  • apbuild/trunk/relaytool

    r2421 r2422  
    55# Copyright 2005 Vincent Béron <vberon@mecano.gme.usherb.ca> 
    66# Copyright 2006 Psyche <psyche@ruidoabsurdo.com> 
     7# Copyright 2007 Taj Morton <tajmorton@gmail.com> 
    78# 
    89############################################################################# 
     
    7475    echo "                            attempt to load them (in the order provided) until" 
    7576    echo "                            one if found. This cannot be used with multiple" 
    76     echo "                            --relay options." 
     77    echo "                            --relay options. The first SONAME in the list will" 
     78    echo "                            be used as the name in the _is_present variable and" 
     79    echo "                            _symbol_is_present function." 
    7780    echo "  --out-dir DIRECTORY       Write stub file to DIRECTORY instead of CWD." 
    7881    echo "Linker commands:" 
     
    115118function relay() { 
    116119    lib="$1" 
    117     libname=$( echo $( basename "$lib" ) | sed 's/\.so.*//' | tr '-' '_' | tr '.' '_' ) 
     120    if $using_multilink; then 
     121        libname=$( echo $( basename ${multilinklist[0]} ) | sed 's/\.so.*//' | tr '-' '_' | tr '.' '_' ) 
     122    else 
     123        libname=$( echo $( basename "$lib" ) | sed 's/\.so.*//' | tr '-' '_' | tr '.' '_' ) 
     124    fi 
    118125    soname=$( objdump -x "$lib" |grep SONAME | awk '{print $2}' ) 
    119126    outfile="$outdir/`basename "$soname"`.stub.c"