findtextrel —
locate text relocation entries in position
independent ELF executables
findtextrel |
[-V]
[-H]
[file ...] |
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.
The
findtextrel utility exits 0 on success,
and >0 if an error occurs.
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
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.
addr2line(1),
nm(1),
readelf(1)
A
findtextrel utility first appeared in the
elfutils toolset from Red Hat, Inc.
This implementation of the
findtextrel utility was
created by
Kai Wang
<
kaiwang27@users.sourceforge.net>.