Commit Graph

66 Commits

Author SHA1 Message Date
Steven Wallace
504e8b978b Add LDDESTDIR to ld command.
Add -I${DESTDIR}/usr/include to cpp command.
1994-09-18 19:41:38 +00:00
Bruce Evans
dd8e0158cf Unmap hints file when finished with it, so that it can go away
completely when ldconfig unlinks it.  If init is shared, then the
referenced unlinked copy of the hints file created by running
ldconfig in /etc/rc caused the file system to be unclean after
every reboot.
1994-09-15 20:48:55 +00:00
Bruce Evans
2577a8acef Add dependencies on libraries to DPADD. Someday this should be done
automagically.  -lfoo has to be right to work, but ${LIBFO0} is too
easy to forget or misspell; nothing checks it and it should be
different for shared libraries.
1994-08-28 18:49:06 +00:00
Garrett Wollman
e410457b74 Install ld.so immutable. 1994-08-26 19:11:14 +00:00
David Greenman
e4e244ac16 Don't explicitly define __FreeBSD__ - this is no longer necessary. 1994-08-19 12:24:45 +00:00
Jordan K. Hubbard
a37e71f354 Remove reference to the ld.so man page - ain't no such animal.
Reported by John Lind.
1994-06-17 17:22:16 +00:00
Rich Murphey
699e1b82fb Changes from Paul Kranenburg which bring us into sync with his sources:
handling of errors through the standard err() and warn()
 more fixes for Geoff Rehmet's NULL pointer bug.
 fixes NULL pointer bugs when linking mono and nested X servers.
 supports a `-nostdlib' option.
 accept object files without a symbol table
 don't attempt dynamic linking when `-A' is given

a few variable names have chaged (desc -> fd), and the formatting has
changed which should make it much easier to track his sources.

I tested 'make world' for /usr/src and X twice with these changes.
1994-06-15 22:41:19 +00:00
Geoff Rehmet
86a13e77dd Bug reported by Jon-Dean Mountjoy <csjm@cs.ru.ac.za>
Paul Kranenburg's description:
ld is in error here, assuming that symbols with N_EXT set always have an
entry in the (global) symbol table: this is not the case for C++ generated
constructor/destructor symbols. I can reproduce your failure by fudging
a "multiply defined" constructor symbol by hand. Checking for `g == NULL'
seems to be a ok as a fence for now.

So:
for now, in do_file_warnings() we check if g == NULL, before trying to generate
any warning messages.  This prevents a NULL pointer dereference.
1994-06-14 12:45:41 +00:00
Andreas Schulz
91b1841dd2 Add the -r and -s flags to the Usage string. 1994-06-05 19:04:11 +00:00
Andreas Schulz
e7ae632e5a Change the private declarations from dlopen,dlclose,dlsym,dlctl
to public. These functions are also used in /usr/include/link.h,
so it looks, like they shouldn't be private.
I will ask Paul about that, if this is correct.
1994-04-13 20:52:40 +00:00
Andreas Schulz
8b395a3055 Better link ldconfig static instead dynamic. 1994-04-13 20:49:42 +00:00
Andreas Schulz
1cc30df665 Add that /usr/X386/lib is also in the default path for ldconfig. Bug found
by Satoshi Asami ( asami@cs.berkeley.edu ). Fixed also a minor typo
problem.
1994-04-05 08:24:19 +00:00
Andreas Schulz
3507018b5b Due to the deletion of the gcc support from libc we need again the
-lgcc_pic library. rtld uses the udivd3 routine from it.
Repeat the bug by simply compiling ld on current.
1994-03-10 23:19:54 +00:00
David Greenman
5bebac3224 Document existance of -Z 1994-03-09 14:28:02 +00:00
David Greenman
fe8ab1a5fe Handling of the netzmagic flag was completely missing after the last
update. This completely broke support for all ZMAGIC a.out formats.
1994-02-17 03:57:00 +00:00
Rodney W. Grimes
44ff78b7aa I yelled, I warned and now I am SCREAMING. Add -D__FreeBSD__ to CFLAGS+=
so that you can bootstrap a 1.0.2 system.  Please oh please no one but
no one add any more #ifdef __FreeBSD__ stuff UNTIL 1.1 has SHIPPED!!!
1994-02-14 10:02:13 +00:00
Jordan K. Hubbard
7883064ac0 A fast private malloc for ld.so 1994-02-13 20:44:09 +00:00
Jordan K. Hubbard
09e3d49d92 This is Paul K's latest set of ld changes. A commit was necessary at this
late stage due to the fact that link.h was copyright Sun Microsystems.

This version of ld sync's us up with NetBSD's ld and supports compatablily
with NetBSD's -[zZ] flags (which we had reversed).  Compiling with this
new ld will give you RRS warnings for libraries which do not contain .type
infomation - these wsarnings are harmless and will go away as soon as you
recompile your libraries (cd /usr/src; make libraries).
1994-02-13 20:43:13 +00:00
Nate Williams
9859e2cc85 Changed NetBSD -> FreeBSD 1994-02-11 12:12:51 +00:00
Rodney W. Grimes
825079654d Remove /usr/X386/lib and /usr/local/lib from the default locations,
these are handled by /etc/rc and this was causing errors on a new
install as these places do NOT exsist by default!
1994-02-09 02:29:31 +00:00
David Greenman
84462ab47a Removed dependance on EX_DYNAMIC in making decisions on the magic number. 1994-01-19 15:00:37 +00:00
Jordan K. Hubbard
9d4389fddc More proper fix for for shared lib debugging support. 1994-01-14 11:47:00 +00:00
Jordan K. Hubbard
5b3dd4f53e 1. Fix bug where duplicate symbol warnings were suppressed. This often
caued ld to `exit silently', to general confusion.

2. Add Gary Jennejohn's fix to support debugging of shared libraries.
1994-01-12 23:16:19 +00:00
Jordan K. Hubbard
cbb24ea9e1 Updated man page to document new behaviour of -Z, -z and -Q flags. 1994-01-03 23:52:35 +00:00
David Greenman
1799d2585e Implemented 'QMAGIC' a.out format correctly, and changed the default
output to be QMAGIC.
1994-01-03 18:35:54 +00:00
Jordan K. Hubbard
f7122c559f C++ support changes (+misc fixes) from Paul K. 1993-12-22 23:28:35 +00:00
Nate Williams
0bb118a5b1 Fixed Makefile per bug report from Julian Stacey. There was an extra DESTDIR
in front of BINDIR definition.
1993-12-16 21:51:27 +00:00
Jordan K. Hubbard
6277403422 Added sbrk() as new file. 1993-12-11 21:06:36 +00:00
Jordan K. Hubbard
8b6ddcb0a3 Broke sbrk() out of rtld as part of general cleanup. 1993-12-11 21:06:00 +00:00
Jordan K. Hubbard
c9cb3c7ea5 Omitted 4th argument to findshlib() [thanks Rich!]. Our ld is a bit
different from NetBSD's here and it squeaked through the update.
1993-12-11 20:08:39 +00:00
Jordan K. Hubbard
b640de6119 Sync up with Paul K's latest ld from cesium. 1993-12-11 12:02:10 +00:00
Jordan K. Hubbard
127447df73 makedepend fails for ld. I think it because the .S files are
preprocessed the same as when they are compiled.  I just remove the
single-quotes from the offending comments.  Rich
1993-12-10 10:16:00 +00:00
Jordan K. Hubbard
31a947eb76 Added the TODO file. Also wanted to announce the previous change to rtld.c
which eliminates the stack walking code (from David G.).  My previous commit
message was eaten by mistake!
1993-12-09 17:53:08 +00:00
Jordan K. Hubbard
a0b8281d40 David Greenman's latest changes to eliminate much stack-walking jazz
(no more sbrk_init()!).
1993-12-09 17:45:43 +00:00
Jordan K. Hubbard
230d2c5ff9 More changes to bring FreeBSD in sync with Paul K's latest. 1993-12-04 00:53:16 +00:00
Jordan K. Hubbard
2e21ebe5ce More changes to bring FreBSD in sync with Paul K's latest. 1993-12-04 00:53:02 +00:00
Andrey A. Chernov
64990426e4 Sorry, Jordan, but I restore previous version again.
You write that
LDFLAGS+= -Xlinker -Bstatic
no more needed, but you have
CFLAGS += -static -I$(.CURDIR) -I$(.CURDIR)/$(MACHINE)
This -static doesn't make any sense in your version,
because it not passed to linker's state (LDFLAGS),
so we have SHARED /usr/bin/ld in this case.
(Older Makefile produce non-shared ld).
I suppose, that -static in CFLAGS was introduced to
make non-shared ld, so I restore previous LDFLAGS
to have non-shared ld. If we want to have shared ld
we need to remove -static from CFLAGS too, not only LDFLAGS,
but this need special issue and corresponding
commit log. Your current version hang into intermediate
state (beetween two sides), so I move it to one side.

Second, I restore NOPIC dependance again from older Makefile:
.if !defined(NOPIC)
SUBDIR+= rtld
.endif
We don't need ld.so, if NOPIC

P.S. I don't see any purpose to commit new makefile, old version
is better.
1993-12-02 09:56:30 +00:00
Andrey A. Chernov
1f30bc0f0d #ifdef DEBUG unwanted message, third time after Jordan... 1993-12-02 09:32:26 +00:00
Nate Williams
02974dc4fb Moved DEBUG conditional where it belonged to remove DEBUG code out of
default compilation.
1993-12-02 05:09:52 +00:00
Jordan K. Hubbard
1e503f71fb Second attempt to integrate Paul K's changes. 1993-12-02 01:03:47 +00:00
Jordan K. Hubbard
88ac367bd7 Second attempt to integrate Paul K's changes. 1993-12-02 00:56:40 +00:00
Andrey A. Chernov
db4d1e7156 All -static and -Xlinker -Bstatic flags missed in
newly commited Makefile.
NOPIC dependance missed too!
Oh it is really pain to check all that broken stuff,
Please, check it *before* commit!
1993-12-01 15:58:22 +00:00
Andrey A. Chernov
b242393f9b #ifdef DEBUG missed by several lines!
!!! Please, COMPILE *BEFORE* COMMIT!
1993-12-01 15:34:01 +00:00
Andrey A. Chernov
50b517092a Add DEBUG #ifdef, (second time!)
!!! Please, anybody who update ld to NetBSD current,
!!! look at old cvs logs!
1993-12-01 15:13:42 +00:00
Andrey A. Chernov
730a80c44c Remove hanging #else part (with second sbrk()) without #if & #endif
Add missing argument to findshlib, I am not shure,
but it seems that it is 1.
!!! Does anybody compile it before commit?
1993-12-01 15:05:31 +00:00
Andrey A. Chernov
ff78e5dfcf Remove -g option (second time!)
!!! Please anybody who port Makefiles from NetBSD,
!!! remove -g option!
1993-12-01 14:45:35 +00:00
Jordan K. Hubbard
52c4ca7af3 Many recent fixes from Paul K, add support for chaining of shared lib deps. 1993-11-30 20:47:54 +00:00
Jordan K. Hubbard
0f81714b34 Added -lgcc_pic back again. 1993-11-25 01:06:42 +00:00
Jordan K. Hubbard
d3ab4e4900 Some of the latest changes from Paul K (taken from NetBSD-current). 1993-11-22 19:05:31 +00:00
Jordan K. Hubbard
437c34ef5b Recent Paul K. changes for compiling X shared (tested on my box). 1993-11-18 20:52:34 +00:00