xlate_get_info(3E)

xlate_get_info - Retrieves recorded overall information

As shipped in IRIX 6.5.22. Last changed in IRIX 6.5.19.

NAME
     xlate_get_info - Retrieves recorded overall information

SYNOPSIS
     #include <elf.h> #include <libelf.h> #include <dwarf.h> #include
     <libdwarf.h> #include <cmplrs/xlate.h> #include <libXlate.h>

     int xlate_get_info(xlate_table_con con_table_ptr,
       Elf64_Sxword *data_moved,
       Elf64_Addr   *new_low_addr,
       Elf64_Addr   *old_low_addr,
       Elf64_Addr   *new_high_addr,
       Elf64_Addr   *old_high_addr,
       Elf64_Addr   *startup_fwa,
       Elf64_Addr   *startup_lwa,
       Elf64_Xword  *number_of_ranges,
       int          *old_text_exists,
       int          *old_text_alloc
       int          *is64bit
       xlate_tablekind *tablekind
       int          *version );

DESCRIPTION
     xlate_get_info is used to get basic values from the xlate section.
     con_table_ptr must be a valid open translate table handle.  The other
     arguments are pointers passed in and used to put values from the
     translation table header into the pointed-to data objects.  See
     xlate.h for the header field declarations.  The memory that is pointed
     to by the pointer is what is actually changed.

     Other than con_table_ptr, any of the pointers passed in may be the
     null pointer (0).  xlate_get_info notices each null pointer and does
     not attempt to pass a value back through a null pointer.

     data_moved
             Number of bytes the data section was moved by a translation
             tool (usually only pixie(1) moves data sections).  The value
             is not the amount the text was moved but the amount that the
             data had moved above and beyond text movement.  The movement
             is important because rld(1) relies on the distance between
             text and data being fixed.  The movement is an important fact
             in the translation process but the fact is not ordinarily
             needed by consuming tools or applications.

     new_low_addr
             Set to the low pc address of the translated (runnable) text.

     old_low_addr
             Set to the low pc address of the original (before translation)
             text.

     new_high_addr
             Set to the high pc address  (one past the last address
             actually used) of the translated (runnable) text.

     old_high_addr
             Set to the high pc address (one past the last address actually
             used) of the original (before translation) text.

     startup_fwa
             Set to the pc address (First Word Address in the translated
             text) of special startup code introduced by a translation
             tool.  pixie is currently the only tool creating such special
             startup code.

     startup_lwa
             Set to the pc address (Last Word Address in the translated
             text) of the end (actually one past the last address) of the
             startup code introduced by a translation tool.  pixie is
             currently the only tool creating such special startup code.

     number_of_ranges
             Set to the number of ranges in the translation table.

     old_text_exists
             Set to 1 if the original (untranslated) text is present in the
             executable or DSO.  It is set to 0 if the original text is not
             present.  cord(1)ed DSOs often do not have the original text
             present.  pixied applications and DSOs usually do have the
             original text present.

     old_text_alloc
             Set to 1 if the original text is present and is marked to be
             brought into memory automatically on program startup.
             Otherwise, old_text_alloc is set to 0.  This lets a consuming
             application (such as a debugger) know what it has to do to
             find the relevant original text image.

     is64bit Set to 1 if the xlate file is marked as 64-bit (for a 64-bit
             application).

     tablekind
             Set to one of one of the following: xlate_tk_general,
             xlate_tk_preserve_size, or xlate_tk_preserve_order.

     version Set to one of the following:  XLATE_TB_MAIN_V1(1),
             XLATE_TB_COPY_V1(2), XLATE_TB_DEBUG_V1(3), XLATE_TB_OLD_V1(4),
             XLATE_TB_32_V2(5), or XLATE_TB_64_V2(6).

THREAD SAFETY
     The xlate functions are thread safe.  This means that if distinct
     xlate_table_con and xlate_table_pro handles are used in distinct
     threads to call xlate functions simultaneously in multiple threads,
     the threads will not interfere.

     However, using a particular xlate_table_con handle or a particular
     xlate_table_pro handle to call xlate functions simultaneously in
     multiple threads is not supported and may cause unpredictable results.

FILES
     /usr/include/libXlate.h
     /usr/include/cmplrs/xlate.h
     /usr/include/elf.h
     /usr/include/dwarf.h
     /usr/include/libdwarf.h
     /usr/lib/libelfutil.a

DIAGNOSTICS
     Returns XLATE_TB_STATUS_NO_ERROR (0) on success.  In case of error, a
     negative number is returned indicating the error.  In case of error,
     nothing is returned through the pointer arguments which would return
     values on a successful call (values might have been changed through
     these pointers but any such changes are not meaningful).

     XLATE_TB_STATUS_INVALID_TABLE
             The initial bytes of the structure pointed to by
             consumer_table_ptr have been corrupted (indicating malloc(3)
             arena corruption) or the pointer is not pointing to a valid
             open consumer table.

SEE ALSO
     open(2),
     xlate_init_fd(3e),
     xlate_finish(3e),
     xlate_pro_init(3e),
     xlate_pro_finish(3e),
     xlate_pro_add_info(3e),
     xlate_address(3e),
     xlate(4),
     libelfutil(5)