diff options
author | paul <paul@FreeBSD.org> | 1993-11-09 04:19:36 +0000 |
---|---|---|
committer | paul <paul@FreeBSD.org> | 1993-11-09 04:19:36 +0000 |
commit | 62cf7a7029ae90af1ea9ce16be5d9efbafa8ce17 (patch) | |
tree | a0a32c784e66fc50e42eb3f64dc3fad913ef449c /gnu/usr.bin/ld/ld.c | |
parent | 3eebdaba2a8668daaa21ec126f438aad30776fc9 (diff) | |
download | FreeBSD-src-62cf7a7029ae90af1ea9ce16be5d9efbafa8ce17.zip FreeBSD-src-62cf7a7029ae90af1ea9ce16be5d9efbafa8ce17.tar.gz |
Updated to newest ld from pk.
lib.c:
Pull in archives containing definitions needed by shared objects.
warnings.c:
Less spurious "undefined symbol" msgs for shared library defined
symbols.
ld.c:
Do a better job of recognising data in text segments, eg. `const char []'.
shlib.c,ld/rtld/{Makefile rtld.c}
Use strsep() in stead of strtok() and restore colons in eg. env. vars.
Diffstat (limited to 'gnu/usr.bin/ld/ld.c')
-rw-r--r-- | gnu/usr.bin/ld/ld.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index a22d256..00de228 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -29,13 +29,10 @@ static char sccsid[] = "@(#)ld.c 6.10 (Berkeley) 5/22/91"; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* Written by Richard Stallman with some help from Eric Albert. - Set, indirect, and warning symbol features added by Randy Smith. - - NOTE: Set and indirect symbols are no longer supported by this - version. (pk) */ + Set, indirect, and warning symbol features added by Randy Smith. */ /* - * $Id: ld.c,v 1.10 1993/11/01 16:26:13 pk Exp $ + * $Id: ld.c,v 1.11 1993/11/05 12:47:11 pk Exp $ */ /* Define how to initialize system-dependent header fields. */ @@ -1597,7 +1594,7 @@ digest_pass2() /* * It's data from shared object with size info. */ - if (sp->so_defined != (N_DATA + N_EXT)) + if (!sp->so_defined) fatal("%s: Bogus N_SIZE item", sp->name); } else @@ -1761,14 +1758,24 @@ consider_relocation (entry, dataseg) continue; } - if (force_alias_definition && + /* + * Only allocate an alias for function calls. Use + * sp->size here as a heuristic to discriminate + * between function definitions and data residing + * in the text segment. + * NOTE THAT THE COMPILER MUST NOT GENERATE ".size" + * DIRECTIVES FOR FUNCTIONS. + * In the future we might go for ".type" directives. + */ + if (force_alias_definition && sp->size == 0 && sp->so_defined == N_TEXT + N_EXT) { /* Call to shared library procedure */ alloc_rrs_jmpslot(sp); } else if (sp->size && - sp->so_defined == N_DATA + N_EXT) { + (sp->so_defined == N_DATA + N_EXT || + sp->so_defined == N_TEXT + N_EXT)) { /* Reference to shared library data */ alloc_rrs_cpy_reloc(sp); |