aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-aout
Commit message (Collapse)AuthorAgeFilesLines
* libexec: adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-274-3/+11
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326274
* More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-191-1/+1
| | | | | | | | | | | | | | | | | | | In addition to adding `static' where possible: - bin/date: Move `retval' into extern.h to make it visible to date.c. - bin/ed: Move globally used variables into ed.h. - sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings. - usr.bin/calendar: Remove unneeded variables. - usr.bin/chat: Make `line' local instead of global. - usr.bin/elfdump: Comment out unneeded function. - usr.bin/rlogin: Use _Noreturn instead of __dead2. - usr.bin/tset: Pull `Ospeed' into extern.h. - usr.sbin/mfiutil: Put global variables in mfiutil.h. - usr.sbin/pkg: Remove unused `os_corres'. - usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'. Notes: svn path=/head/; revision=241737
* Spelling fixes for libexec/Ulrich Spörlein2012-01-071-1/+1
| | | | Notes: svn path=/head/; revision=229780
* ANSIfy ldconfig and the aout bits it still uses from rtld-aout.Ed Schouten2009-12-292-28/+10
| | | | | | | (Why is aout support still there?) Notes: svn path=/head/; revision=201217
* 64-bit clean + WARNS=6:Xin LI2005-01-142-5/+4
| | | | | | | | | | | | | | | | | | | | - Convert the (char *) cast+cast backs magic to memcpy(3). Without this, the resulting code is potentially risky with higher optimization levels. - Avoid same name when calling local variables, as well as global symbols. This reduces confusion for both human and compiler. - Add necessary casts, consts - Use new style function defination. - Minor style.Makefile(5) tweak - Bump WARNS?= from 0 to 6 ** for the aout code: changes are intentionally limited to ease maintaince. Notes: svn path=/head/; revision=140241
* Restore these files to make ldconfig(8) happy.Tom Rhodes2005-01-114-0/+504
| | | | Notes: svn path=/head/; revision=140072
* Remove a.out runtime linker. It doesn't build and was removed from theTom Rhodes2005-01-1113-4456/+0
| | | | | | | | | | | | | build over two years ago by peter. The binary a.out version of ld.so can be obtained from misc/compat22 or src/lib/compat/compat22. Discussed on: -arch Voted yes: jhb, ru, linimon, delphij Notes: svn path=/head/; revision=140038
* Introduce the PRECIOUSPROG knob in bsd.prog.mk, similarRuslan Ermilov2004-11-031-1/+2
| | | | | | | | | | | to PRECIOUSLIB from bsd.lib.mk. The side effect of this is making installing the world under jail(8) possible by using another knob, NOFSCHG. Reviewed by: oliver Notes: svn path=/head/; revision=137164
* Mechanically kill hard sentence breaks.Ruslan Ermilov2004-07-021-8/+16
| | | | Notes: svn path=/head/; revision=131487
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,Jens Schweikhardt2003-01-012-2/+2
| | | | | | | especially in troff files. Notes: svn path=/head/; revision=108533
* Uniformly refer to a file system as "file system".Ruslan Ermilov2002-12-121-2/+2
| | | | | | | Approved by: re Notes: svn path=/head/; revision=107788
* Initiate deorbit burn for the i386-only a.out related support. Moves arePeter Wemm2002-09-171-1/+1
| | | | | | | | | | | | | | | | | | under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that. Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now. Tested on: i386 (extensively), alpha Notes: svn path=/head/; revision=103436
* Assume __STDC__, remove non-__STDC__ code.Alfred Perlstein2002-05-281-23/+2
| | | | Notes: svn path=/head/; revision=97420
* Change brk's prototype from char *brk(const char *) to int brk(const void *)David Malone2002-01-241-1/+1
| | | | | | | | | | | | | | | | | | and sbrk's prototype from char *sbrk(int) to void *sbrk(intptr_t). This makes us more consistant with NetBSD and standards which include these functions. Bruce pointed out that ptrdiff_t would probably have been better than intptr_t, but this doesn't match other implimentations. Also remove local declarations of sbrk and unnecessary casting. PR: 32296 Tested by: Harti Brandt <brandt@fokus.gmd.de> MFC after: 1 month Notes: svn path=/head/; revision=89732
* Fixed some of style bugs.Ruslan Ermilov2001-09-121-1/+1
| | | | Notes: svn path=/head/; revision=83367
* Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. TheSheldon Hearn2001-07-261-1/+1
| | | | | | | | | | definitions are more readable, and it's possible that they're more portable to pathalogical platforms. Submitted by: David Hill <david@phobia.ms> Notes: svn path=/head/; revision=80381
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-101-2/+2
| | | | Notes: svn path=/head/; revision=79529
* - Backout botched attempt to intoduce MANSECT feature.Ruslan Ermilov2001-03-261-1/+1
| | | | | | | - MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74814
* mdoc(7) police: simplify construct.Ruslan Ermilov2001-02-141-3/+1
| | | | Notes: svn path=/head/; revision=72476
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-13/+8
| | | | Notes: svn path=/head/; revision=71895
* Prepare for mdoc(7)NG.Ruslan Ermilov2001-01-161-1/+1
| | | | Notes: svn path=/head/; revision=71099
* Prepare for mdoc(7)NG.Ruslan Ermilov2000-12-271-1/+1
| | | | Notes: svn path=/head/; revision=70397
* Add `_PATH_DEVZERO'.David E. O'Brien2000-12-091-2/+3
| | | | | | | Use _PATH_* where where possible. Notes: svn path=/head/; revision=69793
* Move the man pages for the a.out dynamic linker into the 1aoutJohn Polstra2000-01-292-227/+2
| | | | | | | | | | section. I created rtld.1aout earlier with a repository copy. This clears the way for the ELF dynamic linker man page, which I will commit next. Notes: svn path=/head/; revision=56789
* .Nm += "rtld"Alexey Zelkin1999-09-282-2/+4
| | | | | | | apropos(1) now knows about rtld(1) manpage. Notes: svn path=/head/; revision=51746
* $Id$ -> $FreeBSD$Peter Wemm1999-08-2813-13/+13
| | | | Notes: svn path=/head/; revision=50476
* Fix a bug in the handling of minor version numbers. Formerly, theJohn Polstra1998-11-071-13/+34
| | | | | | | | | | | | | | | | | | | rtld would accept the first shared library it found with the right major version number, even if the minor version number was too low. If a different version of the shared library with an adequate minor version number appeared later in the search path, it would not be found. Now the rtld searches all locations first looking for a library with a minor version that is high enough. Only if such a library is not found will it fall back to accepting a minor version number that is too low. As before, a warning comes out in that case. This solves some problems encountered when building an older world on a -current system. Notes: svn path=/head/; revision=40983
* Don't recognize a file as an a.out shared library unless it has atJohn Polstra1998-09-051-6/+4
| | | | | | | | | | | | | | | least 2 version numbers. This fixes the bug where the dynamic linker would try to load an ELF shared library if it found one. Note, this change also fixes the same thing in "ld", because the code is shared. For "ld" there is still a problem with ".a" libraries, which cannot be distinguished by name. I haven't decided what, if anything, to do about that. Notes: svn path=/head/; revision=38870
* Chaneg MACHINE to MACHINE_ARCH to support MACHINE=pc98.John Birrell1998-09-051-3/+3
| | | | Notes: svn path=/head/; revision=38853
* Pass me the pointy hat with the extra sequins. Just a moment, while I getStephen McKay1998-08-221-6/+20
| | | | | | | | | | | | it to sit right... The __error() hack gave out the wrong address. It returned the address of errno in ld.so instead of the address of errno in the main program. Oops. The hack is now correct, just in time to be obsoleted by elf. Notes: svn path=/head/; revision=38480
* Since I got no objections to this patch, and no one has offered anyStephen McKay1998-06-211-1/+70
| | | | | | | | | | | | | | | alternative, I present .. ta! da! .. the __error() hack. This patch to the a.out dynamic loader provides old a.out binaries with __error() if they are linked with an older libc that lacks it, but are also linked against a library that needs it. There is a smaller, tricker hack that takes advantage of the fact that ld.so has __error() too, courtesy of the new libc, but this hack is the straightforward version. Notes: svn path=/head/; revision=37092
* Search for libraries in dlopen() when the specified pathBrian Somers1998-06-073-8/+13
| | | | | | | | | contains no ``/''s. Elf already searches it seems. Mostly submitted by: Mike Smith <mike@smith.net.au> Notes: svn path=/head/; revision=36717
* Seperate the Paul Kranenburg a.out rtld stuff into a stand-alone area awayPeter Wemm1998-06-011-5/+3
| | | | | | | | from the gpl ld code. This is part 2 of something that I began in 1996. A repository copy has happened behind cvs's back. Notes: svn path=/head/; revision=36565
* ELF preparation step 2:Søren Schmidt1998-05-262-4/+4
| | | | | | | | | | | | | | | | | Move a.out libraries to /usr/lib/aout to make space for ELF libs. Make rtld usr /usr/lib/aout as default library path. Make ldconfig reject /usr/lib as an a.out library path. Fix various Makefiles for LIBDIR!=/usr/lib breakage. This will after a make world & reboot give a system that no longer uses /usr/lib/*, infact one could remove all the old libraries there, they are not used anymore. We are getting close to an ELF make world, but I'll let this all settle for a week or two... Notes: svn path=/head/; revision=36397
* Implement dladdr.John Polstra1998-02-061-4/+94
| | | | Notes: svn path=/head/; revision=33137
* Make emacs work again. This is a workaround for the fact that theJohn Polstra1997-12-051-18/+33
| | | | | | | | | | | | | | | | | | | | | | | emacs a.out file, self-generated by emacs's "unexec" function in "unexsunos4.c", is invalid. In particular, its "_end" symbol has the wrong value. The dynamic linker was using the value of that symbol to initialize its sbrk break level. The workaround is to peek at the executable's a.out header in memory, and calculate what "_end" should be based on the segment sizes. I will work out a fix for emacs and send it to the FSF. This dynamic linker workaround is still worthwhile, if only to avoid forcing all emacs users to build a new version. Note: xemacs gives a bogus warning at startup, for related reasons. The warning is harmless and can safely be ignored. I will send a patch to the xemacs maintainers to get rid of it, and meanwhile add a patch file to our port. Notes: svn path=/head/; revision=31546
* Get rid of the dynamic linker's internal malloc package, and arrangeJohn Polstra1997-11-292-267/+474
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | things so that it uses the same malloc as is used by the program being executed. This has several advantages, the big one being that you can now debug core dumps from dynamically linked programs and get useful information out of them. Until now, that didn't work. The internal malloc package placed the tables describing the loaded shared libraries in a mapped region of high memory that was not written to core files. Thus the debugger had no way of determining what was loaded where in memory. Now that the dynamic linker uses the application's malloc package (normally, but not necessarily, the system malloc), its tables end up in the regular heap area where they will be included in core dumps. The debugger now works very well indeed, thank you very much. Also ... Bring the program a little closer to conformance with style(9). There is still a long way to go. Add minimal const correctness changes to get rid of compiler warnings caused by the recent const changes in <dlfcn.h> and <link.h>. Improve performance by eliminating redundant calculations of symbols' hash values. Notes: svn path=/head/; revision=31445
* Many places in the code NULL is used in integer context, wherePoul-Henning Kamp1997-09-181-2/+2
| | | | | | | | | | | | plain 0 should be used. This happens to work because we #define NULL to 0, but is stylistically wrong and can cause problems for people trying to port bits of code to other environments. PR: 2752 Submitted by: Arne Henrik Juul <arnej@imf.unit.no> Notes: svn path=/head/; revision=29574
* spelling corrections.Wolfram Schneider1997-09-132-6/+6
| | | | | | | | PR: docs/4450 Submitted by: josh@quick.net Notes: svn path=/head/; revision=29329
* - In dlsym(), if the lookup fails using the original symbol, prepend anNate Williams1997-08-191-2/+30
| | | | | | | | | | underscore and try looking it up again. This is a non-issue if we switch to ELF. Reviewed by: sef, jdp Notes: svn path=/head/; revision=28434
* Implement dlsym(RTLD_NEXT, symbol).John Polstra1997-08-021-12/+64
| | | | Notes: svn path=/head/; revision=27838
* Typo fix.Masafumi Max NAKANE1997-05-272-6/+6
| | | | | | | | PR: 3693 Submitted by: Kazuo Horikawa <k-horik@yk.rim.or.jp> Notes: svn path=/head/; revision=26195
* Changes to support the kernel linker:Doug Rabson1997-05-131-1/+4
| | | | | | | | | | | | | | | | | Add a -Bforcedynamic option which generates a dynamic object even if no shared libraries were given in the link. Make RRS in text section warnings conditional on "-assert pure-text" so that I can link non-PIC kernel modules without tons of link errors. Changes to bsd.lib.mk to follow. Fix a couple of bugs exposed by the fact that the kernel is not linked at zero. Reviewed by: jdp Notes: svn path=/head/; revision=25774
* Fix a bug that caused the relocs for linker set members in sharedJohn Polstra1997-04-301-1/+3
| | | | | | | | | | libraries to come out as 1-byte relocations instead of 4-byte relocations. Submitted by: Doug Rabson <dfr@nlsystems.com> Notes: svn path=/head/; revision=25300
* Fixed `make depend' and related bogons. LDFLAGS was used forBruce Evans1997-04-161-10/+2
| | | | | | | | | | | | | | ld-specific flags. LDFLAGS is really for ld-related flags for cc, not for ld, and some flags, e.g., -Bshareable, mean completely different things to cc and ld. Having the wrong things in LDFLAGS also broke the standard ${PROG} target. This was kludged around by using a special rule that depended on LDFLAGS being bogus. Fixing `make depend' broke the special rule but fixed the standard rule (except in the DESTDIR case, which was handled more strictly here than elsewhere). Notes: svn path=/head/; revision=24979
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-2213-13/+13
| | | | Notes: svn path=/head/; revision=22996
* Use xmalloc instead of malloc in two places, so that out-of-memoryJohn Polstra1997-01-241-1/+1
| | | | | | | | | conditions will be detected. Submitted by: Philippe Charnier <charnier@xp11.frmug.org> Notes: svn path=/head/; revision=21967
* Pay attention to the environment variable "LD_IGNORE_MISSING_OBJECTS".John Polstra1997-01-173-2/+61
| | | | | | | | | | | | If it is set to a nonempty string, then simply skip any missing shared libraries. This came up in a discussion long ago as a potentially useful feature at sysinstall time. For example, an X11 utility could be used without the X libraries being present, provided the utility had a mode in which no X functions were actually called. Notes: svn path=/head/; revision=21819
* If a library is found in the hints file, but the library doesn't exist,John Polstra1997-01-141-0/+4
| | | | | | | | | | | | ignore the hint. This is a straightforward fix, and it should go into 2.2 after a burn-in period of a few days. Noticed by: bde Notes: svn path=/head/; revision=21693
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-1413-13/+13
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673