Commit Graph

354 Commits

Author SHA1 Message Date
jhawk
6f1ea9f65f Fixup comments to account for --{,no-}whole-archive changes. 2000-12-26 01:29:03 +00:00
mycroft
bb747bc663 Clean up MAJOR crack addiction:
--whole-archive and --no-whole-archive are by nature position-dependent.  Make
it so.
2000-12-16 09:29:29 +00:00
matt
d87584c459 On VAX, JMPTAB reloc use EXTERN as a type bit. However, they are always
EXTERN so we always need to emit them.  This fixes various problem with
using JMP instruction in libc and libm.
2000-11-02 16:14:37 +00:00
mycroft
fe609bcff4 Update some DEBUG printf() formats. 2000-10-27 01:05:30 +00:00
matt
9816935f22 Remove RELOC_SYMBOLICS_THROUGH_JMPSLOT since it isn't required for VAX (and
that's why I added it).
2000-05-28 01:33:58 +00:00
mrg
a48a4a9a4a forward compatible -rpath-link takes an arguemnt; deal with it. 2000-04-26 02:49:04 +00:00
mycroft
493acb76cb More alloca() -> malloc(). Needed to make some shared libraries link when
compiled with -g.
2000-01-13 00:05:32 +00:00
mycroft
9b25bfd178 Semi-random code cleanup.
Also, in the RRS_PARTIAL case, go ahead and allocate a relocation entry if the
bind failed.  (Who knows?  Maybe some day we'll allow relinking an executable.)
2000-01-07 21:19:36 +00:00
mycroft
5a63d68e02 Fix two problems:
* On other systems, `-Bsymbolic' does not affect undefined (external)
  symbols at all.  We were generating invalid PLT slots in this case.
* Do not prebind GOT and PLT slots when `-r' is used; only do so if
  -Bsymbolic is used {or if we're in RRS_PARTIAL mode, but I'm not
  sure that's correct}.  Otherwise, we could inadvertantly prebind
  symbols when using `-r' with PIC files; when the resulting .o file
  is then linked into a shared library, the library would not permit
  an executable to override its symbols as it's supposed to.
2000-01-07 20:23:41 +00:00
phil
aca0169f10 open(2) can legally return 0. Errors only if return value < 0.
(Test for good is >= 0.)
1999-12-01 03:45:54 +00:00
lukem
fea5b77bc6 don't bother calling fwrite() if count == 0' ld.c 1999-11-08 21:58:00 +00:00
tron
5551faab76 Don't abuse alloca() for allocating memory for string sections which can
easily have a size of several megabytes exceeding the hard stack limit
of some ports. Patch supplied by Richard Earnshaw in PR bin/8547.
1999-10-04 17:54:15 +00:00
mycroft
41147083cf Don't use GNU malloc() any more. 1999-07-30 04:07:23 +00:00
pk
564318d090 Fix printf(3) format warning (per Kurt Schreiner on port-sparc). 1999-06-25 12:10:42 +00:00
garbled
d1407362ba More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:43:46 +00:00
ross
df67e92417 Missing .El, questionable .Sh use. 1999-03-09 03:13:27 +00:00
tv
7f2b95a332 Add arm32 hacks to ld, and reenable ld on arm32. As is well known, XXX
this needs a real fix.
1999-02-27 03:31:12 +00:00
kleink
3ed4fcf61e In userland, pull in <errno.h> instead of <sys/errno.h> for the declaration
of errno.
1999-01-11 22:39:59 +00:00
itohy
85da239ef8 Fix byte order swapping for cross linker. 1999-01-05 10:02:20 +00:00
cjs
a5b9b9c815 Include sys/resource.h, because otherwise RLIMIT_STACK is not set
and ld does not bump up its stack limit. This causes large links
(such as the kernel) to segfault on machines with a small stack
limit (particularly sparc, .5 MB).
1998-12-30 15:09:04 +00:00
pk
4ba42b7d80 shlib.c has been Moved to `src/libexec/ld.aout_so'
etc.c and ld.h have been obsoleted.
1998-12-17 15:41:48 +00:00
pk
0ea0854e75 These files now live in `src/libexec/ld.aout_so/arch' 1998-12-17 15:38:54 +00:00
pk
aca560d3b4 Adjust include directories.
Enable standard gcc error checking.
1998-12-17 15:17:27 +00:00
pk
e9e87c8bee Collect implementation definitions in `ld_i.h' and use that in other files.
Deal with missing and incorrect prototypes, so this compiles with gcc's
strict error checking turned on.
1998-12-17 14:34:51 +00:00
pk
9f709b3e8b The a.out version of ld.so now lives in `src/libexec/ld.aout_so' 1998-12-17 11:50:58 +00:00
pk
cec94710e3 ldconfig(8) now lives in `src/sbin/ldconfig' 1998-12-17 11:47:20 +00:00
pk
b489374794 ldd & ldconfig are no longer here. 1998-12-15 22:36:24 +00:00
pk
1ad0913030 Cast down the prototype revolt for now.. 1998-12-15 22:34:38 +00:00
pk
fc2f406a64 Pull in proper headers; deal with compiler warnings; miscelleneous KNF. 1998-12-15 22:27:14 +00:00
pk
6dc44fab77 ldd has moved to `src/usr.bin/ldd/ldd_aout' 1998-12-15 22:10:19 +00:00
pk
b53366509b Deal with compiler warnings: format strings, prototypes, variable initialization. 1998-12-15 21:35:17 +00:00
pk
c03c29c0e4 Prototypes. 1998-12-15 21:33:00 +00:00
pk
f6f34d9c9f Pull in <a.out.h>. 1998-12-15 21:28:28 +00:00
pk
7e47c7f32b Add & correct prototypes. 1998-12-15 21:27:08 +00:00
pk
631ebffde3 Layout & compiler warnings. 1998-12-15 21:23:57 +00:00
pk
ad3e459220 NetBSD -> __NetBSD__ 1998-12-15 21:22:52 +00:00
mycroft
dedf21f286 Put back code to use pc-relative branches in the PLT, and avoid doing cache
flushes.
1998-12-03 15:56:51 +00:00
mycroft
26fce3548b Use the `first' argument to md_fix_jmpslot(). 1998-12-03 15:46:28 +00:00
matt
ce394ac326 Add hook to convert some DISP32 relocs to BASREL through a GOT entry.
[XXX not perfect since gotslot are allocated on a per-symbol basis but
not a per-symbol & addend tuple.  This makes impossible to have separate
GOT entries to ___sF (stdin), ___sF+88 (stdout), and ___sF+176 (stderr)]
1998-10-31 09:04:29 +00:00
matt
931b784473 Remove reference to unused include file. 1998-10-31 08:59:58 +00:00
matt
64f4491c2e Add a hook for converting "normal" DISP32 relocs that refer to data symbols
in a shared object to BASEREL relocs through a GOT entry.
1998-10-31 08:56:24 +00:00
kristerw
a2030d670f Revert last change, since it treats external SIZE symbols as
weak undefined symbols. The problem it tried to solve is
actually a bug in non bfd gas.new.

Fixes PR port-i386/6351 from Bernd Ernesti.
1998-10-24 21:07:15 +00:00
matt
8f7b610683 More fixes and optimizations for VAX shared library support. Including
one that makes vfork work.
1998-10-23 00:51:36 +00:00
matt
42ba16dee7 Make the BINDER debug messages a bit more useful (print index and jmpslot
address too).
1998-10-23 00:44:44 +00:00
matt
6ee7d63576 It seems that gas.new has new types to indicate weakness
of symbols.  Adapt our ld to it.
1998-10-21 06:13:08 +00:00
kleink
069e8a5d77 GC empty `FILES' section. 1998-10-20 16:46:15 +00:00
matt
4f1a79cfbd Back out change to md_make_gotreloc which added 4 arguement of got_t *.
Add argument to md_fix_jmpslot indicating whether this the first (i.e
tranfer) jmpslot or not.  Add better support for VAX (the VAX can support
pure text code; let ld that advantage of it).  Checking in verified and
working versions of rtld VAX support routines.
1998-10-19 03:09:31 +00:00
matt
f94bc8f4df Add AUX_LABEL (need for VAX JSB/JMP "jmp" slots). 1998-10-19 00:30:57 +00:00
itohy
102d06b78c 1. The 1st arg of sprintf() shall be nul terminated
(The C specification can read as such and our implementation of sprintf()
issues strlen() to the arg).
2. Eliminate memory leaks.
1998-10-17 17:14:01 +00:00
itohy
9d79a50f6a Correct return value of md_midcompat(). 1998-10-17 17:08:21 +00:00