Commit Graph

111 Commits

Author SHA1 Message Date
Konstantin Belousov
fcbb1441d0 ldconfig: remove two symbols
_PATH_LD32_HINTS is unused because it is a.out remnant.
_PATH_ELF32_HINTS is provided by rtld_paths.h already.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2022-01-08 12:45:46 +02:00
Warner Losh
8b7cc20f79 ldconfig: remove libsoft support
Remove support for -soft and its implementation. This arg was never
documented, so no need to remove it from the man page.

Sponsored by:		Netflix
2022-01-06 22:44:07 -07:00
Konstantin Belousov
3ede04c78c ldconfig(8): check for no-args command line after options are parsed
Default action for ldconfig is specified as -R AKA 'append', and for
no-args (without options changing default actions), ldconfig should
append empty list of directories to current list.  But because the check
was done before options were parsed out, presence of any option turned
off default rescan.

As result, innocently-looked commands like `ldconfig -v' were interpreted
as setting directory hints list to one specified on the command line,
i.e. empty.

Reported by:	https://github.com/mesonbuild/meson/issues/9592
Reviewed by:	emaste
Tested by:	jbeich
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33058
2021-11-25 01:55:04 +02:00
Konstantin Belousov
af91158706 ldconfig: use libexec/rtld-elf/rtld_paths.h
instead of duplicating definitions using slighly different macro names.

Reviewed by:	emaste
Tested by:	jbeich
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33058
2021-11-25 01:55:04 +02:00
Konstantin Belousov
b828161d12 ldconfig(8): nostd/-s does nothing
Remove the option from man page and summary.  Silently ignore it when
parsing command line for backward compatibility.

Reviewed by:	emaste
Tested by:	jbeich
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33058
2021-11-25 01:55:03 +02:00
Konstantin Belousov
3f2c6f5598 ldconfig: start of cleanup
Use bool.
Use local variables instead of static.
Remove non-functional debugging override of hints file path.
Use explicit exit() instead of return from main.
Minor style tweaks.

Reviewed by:	emaste
Tested by:	jbeich
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33058
2021-11-25 01:55:03 +02:00
Konstantin Belousov
83511ce5c4 ldconfig: remove a comment which is another remnant of a.out support
Noted and reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D33058
2021-11-25 01:55:03 +02:00
Konstantin Belousov
a19e14ca2d ldconfig(8): update manpage to reality
ELF ldconfig only maintains the search list, there is no hints

Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D30272
2021-05-21 19:51:18 +03:00
Ed Maste
50a40d0911 ldconfig: Retire a.out support
aout support in ldconfig hasn't been required since FreeBSD 2.x.
If someone needs to use FreeBSD 2 shared libraries they will be best
served by using a FreeBSD 2 ldconfig as well.

In aa5e1b42e6 we removed the ldconfig a.out invocation from rc.d but
left the support in ldconfig itself.  Remove it now.

Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27481
2020-12-31 10:29:08 -05:00
Ed Maste
2ee11faacf ldconfig: add aout deprecation notice
aout support in ldconfig hasn't been required since FreeBSD 2.x.
Anyone still using FreeBSD 2 shared libraries can also use a FreeBSD 2
ldconfig to generate aout ldconfig hints.

Sponsored by:	The FreeBSD Foundation
2020-03-17 15:57:25 +00:00
Edward Tomasz Napierala
308224833a Make ldconfig(8) atomic, by removing an unneccessary call to unlink(2)
before rename(2).

Reviewed by:	kib
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D16641
2018-08-09 11:46:12 +00:00
Eitan Adler
d85e65cb35 ldconfig(8): use .Nm instead of 'ldconfig' 2018-01-09 06:51:41 +00:00
Eitan Adler
f0c0c1daec ldconfig(8): clarify language for files
The previous language did not make it clear that 'Files' are
the files specified above. Clarify it.

Reported by:	dana <dana@dana.is>
Reviewed by:	dana <dana@dana.is>
MFC After:	1 week
2018-01-07 05:38:53 +00:00
Pedro F. Giffuni
1de7b4b805 various: general adoption of SPDX licensing ID tags.
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.
2017-11-27 15:37:16 +00:00
Bryan Drewery
ea825d0274 DIRDEPS_BUILD: Update dependencies.
Sponsored by:	Dell EMC Isilon
2017-10-31 00:07:04 +00:00
Edward Tomasz Napierala
be8f91d3d0 Use MAP_PRIVATE instead of obsolete MAP_COPY. No functional changes.
MFC after:	2 weeks
2017-10-30 08:56:04 +00:00
Enji Cooper
22289a8c3d sbin: normalize paths using SRCTOP-relative paths or :H when possible
This simplifies make logic/output

MFC after:	1 month
Sponsored by:	Dell EMC Isilon
2017-03-04 11:33:01 +00:00
Glen Barber
406d87b1c3 Explicitly add more files to the 'runtime' package.
Sponsored by:	The FreeBSD Foundation
2016-02-09 20:19:31 +00:00
Warner Losh
4153c21113 Add ldconfig -soft to process the soft float abi libraries and put it
into startup scripts for armv6. It acts much like ldconfig -32 does.
2016-01-18 21:40:18 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
69e6d7b75e sync from head 2013-04-12 20:48:55 +00:00
Warner Losh
2493aadade 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 Dahl
245e0480d2 Remove obsolete objformat information.
Submitted by:	db
2013-03-19 12:35:33 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
f709df34c3 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
Ruslan Ermilov
106d839190 Switch the default WARNS level for sbin/ to 6.
Submitted by:	Ulrich Spörlein
2009-10-19 16:00:24 +00:00
Peter Wemm
b7696cdf60 Remove unused reference to objformat.h 2007-01-25 22:38:58 +00:00
David E. O'Brien
16edf4d4b5 Tweak -32 description and add -32 FILES. 2005-12-09 03:12:25 +00:00
Ruslan Ermilov
4e9e907d63 -mdoc sweep. 2005-11-18 10:36:29 +00:00
John Baldwin
6efabadaef Document -32 flag in usage() output as well.
Requested by:	ru
MFC after:	1 week
2005-11-11 21:24:21 +00:00
John Baldwin
cff2cd1d3c 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
Ruslan Ermilov
8d646af581 Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
Xin LI
74b67e8422 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
Xin LI
665fc054fd Use a better name than underscore-tmpfile for better representation
of the meaning.

Suggested by:	stefanf
2005-01-14 13:18:55 +00:00
Xin LI
06eda379d4 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
Stefan Farfeleder
4eae39bfdf Avoid using void pointers in additive expressions.
PR:		56653
2004-08-14 17:46:10 +00:00
Ruslan Ermilov
9806e23132 Mechanically kill hard sentence breaks. 2004-07-02 21:45:06 +00:00
Peter Wemm
c905e45dc0 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
Colin Percival
7d85b9aa14 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 Karlsson
604d24db95 style.Makefile(5):
Use WARNS?= instead of WARNS=.
2004-02-23 20:25:27 +00:00
Tom Rhodes
55566e93bb 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 Wemm
66422f5b7a 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
John Polstra
92fd901869 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
Philippe Charnier
e1205e80e5 The .Nm utility 2002-07-06 19:34:18 +00:00
Warner Losh
854299908c o __P removed
o main prototype removed
2002-03-21 13:14:21 +00:00