T.R | Title | User | Personal Name | Date | Lines |
---|
63.1 | Will this affect "cc -Bstring"? | DECC::SULLIVAN | Jeff Sullivan | Mon Jan 20 1997 15:35 | 17 |
63.2 | | SMURF::COURTNEY | | Tue Jan 21 1997 15:55 | 5 |
63.3 | Does resolution *always* start with the current library if linked -B symbolic? | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Fri Jan 24 1997 15:56 | 28 |
| Is my understanding correct?
If my shared library "test.so" contains two functions:
libentry() { printf("in test.so/libentry\n"); test(); }
test() { printf("in test.so/test\n"; }
and my main source file contains
main() { test(); libentry(); }
test() { printf("in main/test\n"); }
then by today's rules I see
> cc main.c test.so
> a.out
in main/test
in test.so/libentry
in main/test
and if I built the library test.so using -B symbolic then I would see
> cc main.c test.so
> a.out
in main/test
in test.so/libentry
in test.so/test
That is, references within the library are resolved to definitions within
the library if possible, even if there is already an active definition of
the same name?
|
63.4 | correct | SMURF::LOWELL | | Mon Jan 27 1997 09:29 | 6 |
| re. .3
That's correct. -B symbolic will essentially turn off
preemption.
|
63.5 | Please don't take this the wrong way... | WIBBIN::NOYCE | Pulling weeds, pickin' stones | Mon Jan 27 1997 10:35 | 4 |
| It sounds as if this gives ld an opportunity to optimize intra-image
references in that case, such as turning JSR's into BSR's, and
eliminating loads from the GOT. Perhaps this could reduce some of
the notorious overhead of using shared libraries on Digital UNIX.
|
63.6 | | AOSG::LOWELL | | Mon Jan 27 1997 11:12 | 15 |
| > It sounds as if this gives ld an opportunity to optimize intra-image
> references in that case, such as turning JSR's into BSR's, and
> eliminating loads from the GOT. Perhaps this could reduce some of
> the notorious overhead of using shared libraries on Digital UNIX.
Good observation. If memory serves me, I believe the linker already
does this optimization for references to symbols defined in the main
executable (building on the assumption that the main executable's
symbols can only be the premptors, not the preemptees.) Since the
basic optimization mechanism is already in place in ld, it may not
be too difficult to expand it to do the same thing for shared libraries,
when -B symbolic is specified.
Thanks for identifying this opportunity.
|
63.7 | approved | AOSG::LOWELL | | Mon Jan 27 1997 11:35 | 8 |
| The review minutes for this proposal will be
available online at
http://www.zk3.dec.com/~lowell/of_stwg/dmin012797.html
The proposal has been approved.
OF/STWG ECO ID = 9
|