Commit Graph

84 Commits

Author SHA1 Message Date
imp
d668ffd124 Add a comment about why aout support is still here: We need it for
compat2x, which is still in use, as evidence by recent bug reports.
2013-03-19 16:57:04 +00:00
joel
34ea777e7c Remove obsolete objformat information.
Submitted by:	db
2013-03-19 12:35:33 +00:00
ed
f590bf3733 ANSIfy ldconfig and the aout bits it still uses from rtld-aout.
(Why is aout support still there?)
2009-12-29 21:07:17 +00:00
ru
763b9ae1f8 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
peter
4cef2cecf2 Remove unused reference to objformat.h 2007-01-25 22:38:58 +00:00
obrien
b2df0e75f4 Tweak -32 description and add -32 FILES. 2005-12-09 03:12:25 +00:00
ru
4de1ee30af -mdoc sweep. 2005-11-18 10:36:29 +00:00
jhb
7d38d16ad5 Document -32 flag in usage() output as well.
Requested by:	ru
MFC after:	1 week
2005-11-11 21:24:21 +00:00
jhb
76df9bf6f7 Document the -32 switch available on amd64.
Submitted by:	Steve Kargl sgk at troutmask dot apl dot washington dot edu
MFC after:	1 week
2005-11-11 20:29:50 +00:00
ru
719be5d341 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
delphij
0c16fd32cc Improve readability for the recently introduced changes by having
their sizeof(*p) instead of explicitlly specifying their types.

Suggested by:	nectar
2005-01-14 15:49:05 +00:00
delphij
d7e35203c7 Use a better name than underscore-tmpfile for better representation
of the meaning.

Suggested by:	stefanf
2005-01-14 13:18:55 +00:00
delphij
830453071a 64-bit clean + WARNS=6:
- 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.
2005-01-14 12:22:57 +00:00
stefanf
bcdeb8e73c Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
ru
46fddaa54b Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
peter
ccd389b7a3 Add initial support for compiling a special 32 bit version of
ld-elf.so.1 on 64 bit systems.  Most of this involves using alternate
paths, environment variables and diagnostic messages.

The build glue is seperate.
2004-03-21 01:21:26 +00:00
cperciva
e1627f9ca5 Fix 10 year old size-of-bcopy bug.
PR:		bin/43930
Submitted by:	Alan Barrett
Approved by:	rwatson (mentor)
MFNetBSD:	revision 1.35
MFC after:	3 days
2004-03-13 00:11:05 +00:00
johan
31854a224a style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
trhodes
b193faf369 Describe the pattern filenames must be in before they are added to the hints
file.

PR:		46271
Approved by:	re (blanket)
2003-05-08 17:25:41 +00:00
peter
a51c9b6627 Initiate deorbit burn for the i386-only a.out related support. Moves are
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
2002-09-17 01:49:00 +00:00
jdp
af43ddac0b Clarify the explanation of the behavior for setuid programs by
noting that the restrictions do not apply if the user invoking the
program is also the owner of the program.

Also, capitalize a section header properly.

PR:		misc/41180
2002-08-18 18:11:38 +00:00
charnier
a2accd01f0 The .Nm utility 2002-07-06 19:34:18 +00:00
imp
baca1664d9 o __P removed
o main prototype removed
2002-03-21 13:14:21 +00:00
obrien
73c6870b18 Remove 'register' keyword.
It does not help modern compilers, and some may take some hit from it.
(I also found several functions that listed *every* of its 10 local vars with
 "register" -- just how many free registers do people think machines have?)
2002-03-20 17:55:10 +00:00
obrien
9baf2f1b03 Default to WARNS=2.
Binary builds that cannot handle this must explicitly set WARNS=0.

Reviewed by:	mike
2001-12-04 02:19:58 +00:00
ru
7cef49ff86 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 11:04:34 +00:00
schweikh
0ca270a59b Fix a "this sentence no verb" grammar bogon.
MFC after:	1 week
2001-06-08 21:20:14 +00:00
obrien
538e761e02 * include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.
2001-05-02 23:56:21 +00:00
ru
86642a4ab4 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
56b5d7535b Set the default manual section for sbin/ to 8. 2001-03-20 18:13:31 +00:00
ps
5108b14206 Elminate common declaration.
Reviewed by:	peter
2001-02-22 21:53:39 +00:00
ru
8a6f8b5fe4 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
ru
7fe8bd2b88 Prepare for mdoc(7)NG. 2000-12-18 15:16:24 +00:00
jdp
807299d24d Extend the ldconfig security check so that it ignores group-writable
directories in addition to world-writable directories.  As before,
this check can be disabled with the "-i" option, which in turn can
be made the default for boot-up by setting "ldconfig_insecure=YES"
in "/etc/rc.conf".

Also fix an mdoc nit in the manual page.

Submitted by:	Maxime Henrion <mux@qualys.com>
2000-12-17 18:50:56 +00:00
ru
ea31070695 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 16:52:27 +00:00
ru
7d99729431 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
jdp
daf512cf55 Add a "-i" option ("insecure") which disables the checks for
root ownership, etc.  I will soon commit a companion knob for
"/etc/rc.conf".

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-08-07 19:12:04 +00:00
jdp
57948511f5 If a directory is world-writable or is not owned by root, skip it
and emit a warning.  This is a security measure since ldconfig
influences the shared libraries used by all programs.

I think the check should be made even more stringent by also
ignoring group-writable directories.  I will make that change soon
unless we encounter a good reason not to do it.

Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-07-26 04:47:17 +00:00
jdp
1d0099e346 Make "ldconfig" with no arguments behave the same as "ldconfig -R".
Submitted by:	Maxime Henrion <mhenrion@cybercable.fr>
2000-07-09 19:12:49 +00:00
sheldonh
4402d054c2 Remove more single-space hard sentence breaks. 2000-03-06 09:45:37 +00:00
sheldonh
ff1f324516 Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 11:27:47 +00:00
jdp
a69d0d68b5 If a directory on the command line doesn't exist, warn about it
and proceed rather than quitting with a fatal error message.

PR:		bin/16056
Submitted by:	Philipp Mergenthaler <un1i@rz.uni-karlsruhe.de>
2000-01-21 02:15:27 +00:00
kris
9861a8004b Fix insecure tempfile handling
Reviewed by:	audit@freebsd.org
2000-01-16 21:08:58 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
billf
c9ad0075c9 Make usage() reflect reality (add the -aout and -elf options).
OK'd by:	bde
1999-04-21 20:06:42 +00:00
jdp
7aadfa5c68 Add a new library function getobjformat(). It checks all the
standard places ("/etc/objformat", ${OBJFORMAT}, argv) for an
indication of the user's preferred object file format.  This
consolidates some code that was starting to be duplicated in more
and more places.

Use the new function in ldconfig.

Note: I don't think that gcc should use getobjformat(), even though
it could.  The compiler should limit itself to functions that are
widespread, to ease porting and cross-compilation.
1998-09-09 01:21:25 +00:00
jdp
705eaef8b8 Fix calls to mmap. It returns void *, and on failure it returns
MAP_FAILED.

Don't try to extend the mapping in place if it is too short.
There's no guarantee it will be possible.  Remap the file instead.

Put in a few style fixes.

Submitted by:	Bruce Evans <bde>
1998-09-06 20:43:25 +00:00
jdp
a1a2d181d2 For a.out mode, ignore shared libraries that don't have at least 2
version numbers.
1998-09-05 16:20:15 +00:00
jdp
6c76bd6d54 Implement ldconfig functionality for ELF. The hints are stored in
a different file than the a.out hints, namely, "/var/run/ld-elf.so.hints".
These hints consist only of the directory search path.  There is
no hash table as in the a.out hints, because ELF doesn't have to
search for the file with the highest minor version number.  (It
doesn't have minor version numbers at all.)

A single run of ldconfig updates either the a.out hints or the ELF
hints, but not both.  The set of hints to process is selected in
the usual way, via /etc/objformat, or ${OBJFORMAT}, or the "-aout"
or "-elf" command line option.  The rationale is that you probably
want to search different directories for ELF than for a.out.

"ldconfig -r" is faked up to produce output like we are used to,
except that for ELF there are no minor version numbers.  This should
enable "ldconfig -r" to be used for checking LIB_DEPENDS in ports
even for ELF.

I implemented the ELF functionality in a new source file, with an
eye toward eliminating the a.out code entirely at some point in
the future.
1998-09-05 03:31:00 +00:00
bde
b7b0859c3f Fixed printf format errors. 1998-08-02 16:06:35 +00:00