FINDTEXTREL(1) General Commands Manual SourceForge Logo

NAME

findtextrellocate text relocation entries in position independent ELF executables

SYNOPSIS

findtextrel [-V] [-H] [file ...]

DESCRIPTION

The findtextrel utility displays information about text relocations in ELF objects containing position independent code.
Text relocations are usually undesirable because they require that the text sections of objects be modified at load time, preventing the sharing of text sections across multiple processes using a dynamic shared object.
Arguments file ... name ELF executables to be examined. If no files are specified, the findtextrel utility will examine the file a.out in the current directory.
The findtextrel utility recognizes the following options:
 
 
-H
Print a brief help message.
 
 
-V
Print a version identifier and exit.

EXIT STATUS

The findtextrel utility exits 0 on success, and >0 if an error occurs.

EXAMPLES

To list text relocations in an object, use:
% findtextrel a.out 
a.out: ELF object contains text relocation records: 
a.out:   off: 0x530, func: main, file: a.c, line: 5

DIAGNOSTICS

The findtextrel may issue the following diagnostics:
ELF object is not a DSO/PIE
The ELF executable specified by argument object was not a position independent executable.
ELF object does not contain a text relocation
The ELF executable specified by argument object contained no text relocations.

SEE ALSO

addr2line(1), nm(1), readelf(1)

HISTORY

A findtextrel utility first appeared in the elfutils toolset from Red Hat, Inc.

AUTHORS

This implementation of the findtextrel utility was created by Kai Wang <kaiwang27@users.sourceforge.net>.
August 25, 2011 The Elftoolchain Project