This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
reducing reloc syms to section syms
- From: John Reiser <jreiser at BitWagon dot com>
- To: binutils at sources dot redhat dot com
- Cc: Alan Modra <amodra at bigpond dot net dot au>
- Date: Tue, 07 May 2002 23:12:17 -0700
- Subject: reducing reloc syms to section syms
> Is there any benefit in reducing just some relocs using a given symbol
> to the section symbol, and not others?
If all the relocations that refer to a given symbol are reduced to the
corresponding section symbol, then the scope ("globalness") of the given
symbol can be changed [usually: reduced] without altering the current
effective values of the text that is being relocated. This is exceedingly
handy for implementing a "divide and conquer" strategy when constructing
a system out of subsystems. The desired property is that aggregation of
subsystems into a larger unit does not change the internal behavior of
any subsystem. Behavior that was verified in isolated unit testing,
remains the same when aggregated. Much like a version script controls
visibility of symbols that "just happen" to be global as a result
of the artifact of compiling separate source files, so also strength
reduction from symbol name to section name controls the affect of
subsequent relocation which now references a symbol that "just happens"
to be global. (That is: I want the option to reduce relocation
strength as much as possible [symbol==>section==>done] on a symbol-by-
symbol basis.)
--
John Reiser, jreiser@BitWagon.com