(it was directly underneath where bool.h used to be in the list, I think
I must have not been paying attention and deleted a word from the wrong
line. The machine that I was testing on still had an (old?) osfcn.h file)
Pointed out by: Andreas Klemm <andreas@klemm.gtn.com>
libg++'s exception code causes gcc to generate (ahem!) non-conventional
assembler code in -fpic mode that gas and ld choke on. Basically, gas
and ld require than symbols referenced in the GOT (global offset table)
are actually global (as the name implies). It attempted to work around
it before, but didn't quite go far enough to prevent a core dump in ld.
This hack causes GOT referenced symbols to be forced global. This
probably breaks the __EXCEPTION_TABLE__ stuff in pic mode, but heck, it
wasn't even possible to compile with a shared library before at all.
I'm not 100% sure what the bug is. There's two possibilities:
1: gcc/cp/exception.c has to be fixed to stop doing GOT references to
local symbols, or
2: as/ld/symorder/ld.so etc need to be taught about how to keep local
symbols around so that they can be dealt with in GOT references.
John Polstra's elfkit stuff seems to deal with this fine though, which is
why I think it's a "missing feature" in our hacked gas and ld..
since rt_readenv() already takes care of not setting unsafe variables.
This was part of the changes I submitted to Peter and John during the
review which must have gotten missed.
how I managed to get this out of sync, but I did. I guess that's what I
get for directly committing from different machines that I was testing on.
Pointed out by: Paul Traina <pst@freebsd.org>
a (now) defunct routine that no longer exists (causing an empty .o file),
and were missing some others. Some of the ones we were missing are no-ops
on the i386, so there are now 4 empty .o files.
(It seems that libc/quad has got some defunct functions now)
configurable fallback search paths, as well as new crt interface version.
Also:
- even faster getenv(), get all environment variable settings in a single
pass.
- ldd printf-like format specifications
- minor code cleanups, one vsprintf -> vsnprintf (harmless)
The library search sequence is a little more complete now. Before,
it'd search $LD_LIBRARY_PATH (by opendir/readdir/closedir), then read
the hints file, then read /usr/lib (again by scanning thr directory). It
would then fail if there was no "found" library.
Now, it does LD_LIBRARY_PATH and the hints file the same, but then uses
a longer fallback path. The -R path is fetched from the executable if
specified at build time, the ldconfig path is appended, and /usr/lib is
appended to that. Duplicates are suppressed. This means that simply
placing a new library in /usr/local/lib will work (the same as it did in
/usr/lib) without needing ldconfig -m. It will find it quicker if the
ldconfig is run though.
Similar changes have been made to the NetBSD ld.so, but ours is rather
different now due to John Polstra's speedups and fixes from a while back.
The ldd printf-like format support came direct from NetBSD.
Reviewed by: nate, jdp
ldconfig path (from NetBSD). I added code to make sure there were no
duplicates in the path when multiple ldconfig -m's were used.
Reviewed by: nate, jdp
Obtained from: NetBSD (partly)
with the -R option and store the path in the dynamic header when specified.
The $LD_RUN_PATH environment variable is not checked yet.
While here, split up the code a bit more to enable more selective replacing
of GPL'ed components that are linked with ld.so with others.
Obtained from: NetBSD (mostly, the breakup is my fault)
.weak as gcc and g++ would like to use.
This includes changes to other architectures mostly for completeness,
I don't expect cross-assemblink would work but I could be wrong.
Obtained from: NetBSD
search 'pattern' in whole file 'file', from top to bottom. This is
not necessary; if grep found 'pattern' it can stop further searching
in file 'file'.
Example:
$ time ./grep-old -q Adam /usr/share/dict/*
1.93 real 1.05 user 0.85 sys
$ time ./grep-new -q Adam /usr/share/dict/*
0.14 real 0.06 user 0.06 sys
(the old cc has been tagged with "gcc_2_6_3_final" so we have a reference
point in case of unforseen disasters...)
This has the objc backend active, and I think I've managed to get the
f77 f2c support through in one piece, but I don't know fortran to test it.
A 'make world' change and libobjc commit will follow.
If you normally do 'make -DNOCLEAN world', do not do so this time, I know
it can fail with groff.
This version of gcc makes a **LOT** more warnings on our kernel.
$exit_nomatch: no keyword matched. Default value for variable
exit_nomatch is 0 because `man -k' don't like exit status != 0
Detected by: "Stephen J. Roznowski" <sjr@zombie.ncsc.mil>
as atomically as possible.
(Immutable targets can't be renamed without opening a window when
neither the source nor the target is immutable. Perhaps there
should be a rename_immutable syscall to do this if unsetting the
immutable flags would work.)
Fix things so it *really* won't compile if the environment isn't there.
This commit has been sitting in my to-do list for 2 months. Xditview
should never have been half-removed, so now it's back with a vengance
because we want to keep groff intact as a package.
RCS cannot deal with duplicate tags; the extra one always becomes
inaccessible and useless.
This will prevent the common mistake of specifying the same name
for the vendor tag and the release tag. The FreeBSD CVS repository
already contains zillions of files with this error. We don't need
any more of them.
alias `pcb_cr3' instead. That is still one alias too many, but is convenient
for me since I've replaced the tss in the pcb by a few scalar variables in
the pcb.
need this.
Consider the following code:
case 'O':
output_filename = malloc(strlen(arg)+4);
strcpy(output_filename, arg);
strcat(output_filename, ".tmp");
real_output_filename = arg;
return;
The idea here is to malloc() a buffer big enough to hold the name of
a supplied file name, plus ".tmp". So we malloc() 'size of filename'
bytes plus 4, right? Wrong! ".tmp" is _FIVE_ bytes long! There's a
traling '\0' which strcat() gleefully tacks on _outside_ the bounds
of the buffer. Result: program corrupts own memory. Program SEGVs at
seemingly random times. Bill not like random SEGVs. Bill smash.
Know how I found this? I've been trying to bootstrap -current on my
2.1.0-RELEASE machine at work and I couldn't seem to get libc.a built
because the linker would intermittently blow chunks while executing
things like 'ld -O foo.o -X -r foo.o'. Since this is an initial
bootstrap version of ld, it was linked against the 2.1.0 libc, who's
malloc() behaves differently than that in -current.
Presumeably ld -O doesn't blow up in -current, otherwise someone would
have spotted this already. I don't know if this is a bug or a feature.
Anyway. I'm changing the strlen(arg)+4 to strlen(arg)+5. Bah.
-O filename
Specifies the name of the output file. The file is created as
filename.tmp and when output is complete renamed to filename.
This allows us to:
ld -O ${.TARGET} -x -r ${.TARGET}
file. The field formerly contained random garbage, leading to spurious
differences between otherwise identical executables and libraries.
Submitted by: Bruce Evans <bde@freebsd.org>
been loaded, look for a match by device and inode number if the
traditional pathname comparisons don't find a match. This detects
the case in which a library is requested using two different names
which are really links to the same file, and avoids loading it
twice.
Requested by: peter@freebsd.org
Reviewed by: peter@freebsd.org
matched the filename. Now put the list after the filename. E.g.
filename: vt220keys.1
Keyword: vt220
was: vt220(1), vt220keys(1) - define SHIFTED [...]
now: vt220keys(1), vt220(1) - define SHIFTED [...]
Submitted by: invalid opcode <coredump@nervosa.com>
makewhatis.local - start makewhatis(1) only for file systems
physically mounted on the system
Running makewhatis from /etc/weekly for rw nfs-mounted /usr may kill
your NFS server -- all clients start makewhatis at the same time!
So use this wrapper instead calling makewhatis directly.
Pointed out by: Bruce
"-X" must survive, because of references from relocations, don't
qualify the symbol name with the name of the input file. This
saves some string space. It makes libc_pic.a about 2.4% smaller.
Adapted from a suggestion by Bruce Evans.
descriptions of LD_NO_INTERN_SEARCH and LD_NOSTD_PATH from the manual
page, since they are not supported.
Submitted by: Doug Ambrisko <ambrisko@ambrisko.roble.com>
DITEM_FAILURE - formerly they would simply act as an implicit "continue",
but this is wrong. If you want this behavior, you should now return
with the DITEM_CONTINUE flag set.
Also make the semantics of DITEM_RESTORE quite a bit different - rather
than restore the screen back to pre-menu state, we restore the menu
itself. This is more correct for a variety of reasons when dealing with
nested menus (whoops!).
robust. The new "fire" actions, while affording signficantly more
interactivity to libdialog, come at a cost - if the fire action trashes
the screen then you're not going to be in Kansas anymore when you
come back to the menu and there had better be considerable extra
smarts in place for coping with such a situation. These changes are my
attempt to do just that.
with valid names, the ***/---names were taken first.
this broke eg:
Index: foo/Makefile
==========
RCS <blah>
Retrieving <blah>
diff <blah>
*** Makefile <blah>
--- Makefile <blah>
By trying to patch the Makefile in the _curent_ directory, rather than
the one in the foo/ directory.
man pages up to mdoc guidelines and fix some minor formatting glitches.
Also fixed a number of man pages to not abuse the .Xr macro to
display functions and path names and a lot of other junk.
. rename the function to main'gethostname, so it can be called unqualified,
. strip the trailing \0 character, closes PR # bin/1084,
. a better way to express an insane long string.
Submitted by: Giles Lean <giles@topaz.nemeton.com.au> (except the 1st)
This solves the problem of being unable to use shared libraries with dots
in their names before the ".so.<version>" code.
This should be brought into -stable.
There are more changes from Paul that look like they should be included,
but they change the format of the hints file, so I'm not going to bring them
in now (but we should in the future).
Obtained from: pk@netbsd.org
.Fx version.rel { , . ; : ( ) [ ]
Example:
The
.Nm xyzzy
command first appeared in
.Fx 2.2 .
Produces:
The xyzzy command first appeared in FreeBSD 2.2.
Suggested by wollman.
Also corrected a few minor formatting errors, file location and cross
references in some of the section 3 man pages.
This shuts up a lot of the output from "manck" for section 3.