| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
PR: bin/153667
Notes:
svn path=/stable/8/; revision=223733
|
| |
|
|
|
|
|
| |
load_object
Notes:
svn path=/stable/8/; revision=220440
|
| |
|
|
|
|
|
|
|
|
|
| |
- Add support for TLS relocations.
- Emitt an error when encountering an unsupported and in case of the
kernel also for unaligned relocations.
- Fix R_SPARC_HIX22 and R_SPARC_LOX10 relocations. Apparently these are
hardly ever used.
Notes:
svn path=/stable/8/; revision=219996
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Remove clause 3 and 4 from TNF licenses. [1]
- Add the _RF_X committed in r212998 (merged to stable/8 in r213478) also
to the tables in the sparc64 reloc.c in order reduce differences between
the kernel and the userland source. This results in no functional change
though.
- Consistently abbreviate the names of the relocations.
- End sentences with dots.
- Fix whitespace.
Obtained from: NetBSD [1]
Notes:
svn path=/stable/8/; revision=219940
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If dlclose() is called recursively from a _fini() function, the inner
dlclose() call may unload the object of the outer call prematurely
because objects are unreferenced before _fini() calls.
Fix this by unreferencing objects after calling objlist_call_fini() in
dlclose(). Therefore objlist_call_fini() now calls the fini function if
the reference count of an object is 1. In addition we must restart the
list_fini traversal after every _fini() call because another dlclose()
call might have modified the reference counts.
Add an XXX comment to objlist_call_fini() about possible race with
dlopen().
PR: 133246, 149464
Notes:
svn path=/stable/8/; revision=219237
|
| |
|
|
|
|
|
|
|
|
| |
Make ldd(1) work when versioned dependency file is cannot be loaded.
MFC r218099:
Fix grammar.
Notes:
svn path=/stable/8/; revision=218365
|
| |
|
|
|
|
|
|
|
| |
Remove SuperH architecture from a comment.
Approved by: kib (mentor)
Notes:
svn path=/stable/8/; revision=218126
|
| |
|
|
|
|
|
|
|
| |
Handle failure from ftpd_popen in statfilecmd().
Make format string a string literal. (Discovered by clang.)
Notes:
svn path=/stable/8/; revision=217249
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit merges the MIPS platform changes that was now stable in
-CURRENT into 8-STABLE. The MIPS changesets are too many (~400) to list
here. But the changesets merged in this commit that affect other platforms
are summarized below:
r204635 : (changes to sys/dev/hwpmc, lib/libpmc, sys/sys/pmc.h)
Add support for hwpmc(4) on the MIPS 24K, 32 bit, embedded processor.
r205845: (changes to sys/modules/Makefile)
Fix for building modules on mips and arm.
r204031: (changes to sys/kern/link_elf_obj.c)
printf fix, as part of kernel module support for MIPS.
r206404: (changes to sys/arm/include/bus.h)
Add BUS_SPACE_UNRESTRICTED and define it to be ~0, just like all the
other platforms - for arm and mips.
r206819: (changes to sys/vm/)
Add VMFS_TLB_ALIGNED_SPACE option and kmem_alloc_nofault_space(), which
is used to allocate kernel stack address on MIPS.
r208165, r211087: (sys/kern/subr_smp.c, sys/kern/sched_ule.c)
Enable ULE scheduler for MIPS, Fix for an issue in SMP when 32 cpus are
enabled.
r208659: (sys/{ia64/ia64,mips/mips,sun4v/sun4v}/pmap.c)
Simplify the inner loop of get_pv_entry()
r208794: (changes to sys/vm/)
Make vm_contig_grow_cache() extern, and use it when vm_phys_alloc_contig()
fails to allocate MIPS page table pages.
r210327: (changes to sys/vm/)
Support for MIPS page table page allocation. Add a new function 'vm_page_t
vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to
allocate a page from a specified freelist, and other related changes.
Reviewed by: alc(vm changes only)
Approved by: kib(re), alc(vm), imp(mips), jmallett(mips), gnn(mips pmc)
Notes:
svn path=/stable/8/; revision=215938
|
| |
|
|
| |
Notes:
svn path=/stable/8/; revision=215814
|
| |
|
|
|
|
|
|
|
|
| |
Fix typos.
PR: bin/148894
Submitted by: olgeni
Notes:
svn path=/stable/8/; revision=215588
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If dlopen() is called for the dso that has been already loaded as a
dependency, then the dso never has its DAG initialized. Empty DAG
makes ref_dag() call in dlopen() a nop, and the dso refcount is off
by one.
Initialize the DAG on the first dlopen() call, using a boolean flag
to prevent double initialization.
MFC r214776:
Fix style.
MFC r214777:
Change init_dag() to not increment DAG refcount. Unconditionally call
both init_dag() and ref_dag() in dlopen() for the case when the object
was already loaded.
Notes:
svn path=/stable/8/; revision=215084
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix two subtle problems in PPC32 RTLD. The first is a concurrency issue
where long PLT calls in multi-threaded environments could end up with
incorrect jmptab values. The second is that, after the addition of extended
PLT support, I forgot to update the PLT icache synchronization code to cover
the extended PLT instead of just the basic PLT.
Notes:
svn path=/stable/8/; revision=213833
|
| |
|
|
|
|
|
| |
Use a defined FreeBSD version.
Notes:
svn path=/stable/8/; revision=213641
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Remove the duplicate logging of failed read requests, whose error message
also was inappropriate as it triggered for every EACCESS and ENOTFOUND, not
just the case the -n option is intended to deal with and thus really spammed
us with ~20 messages in the default configuration when booting a diskless
FreeBSD client, introduced with r207608 (commited to stable/8 in 213038)
again.
Notes:
svn path=/stable/8/; revision=213419
|
| |
|
|
|
|
|
| |
Make WARNS=6 clean.
Notes:
svn path=/stable/8/; revision=213417
|
| |
|
|
|
|
|
| |
Try to adhere to style.Makefile(5).
Notes:
svn path=/stable/8/; revision=213415
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Go ahead and merge the work edwin@ on tftpd into the tree. It is a
lot better than what's in the tree now. Edwin tested it at a prior
employer, but can't test it today. I've found that it works a lot
better with the various uboot versions that I've used in my embedded
work. Here's the pkg-descr from the port that describes the changes:
It all started when we got some new routers, which told me the
following when trying to upload configuration or download images
from it: The TFTP server doesn't support the blocksize option.
My curiousity was triggered, it took me some reading of RFCs and
other documentation to find out what was possible and what could
be done. Was plain TFTP very simple in its handshake, TFTP with
options was kind of messy because of its backwards capability: The
first packet returned could either be an acknowledgement of options,
or the first data packet.
Going through the source code of src/libexec/tftpd and going through
the code of src/usr.bin/tftp showed that there was a lot of duplicate
code, and the addition of options would only increase the amount
of duplicate code. After all, both the client and the server can
act as a sender and receiver.
At the end, it ended up with a nearly complete rewrite of the tftp
client and server. It has been tested against the following TFTP
clients and servers:
- Itself (yay!)
- The standard FreeBSD tftp client and server
- The Fedora Core 6 tftp client and server
- Cisco router tftp client
- Extreme Networks tftp client
It supports the following RFCs:
RFC1350 - THE TFTP PROTOCOL (REVISION 2)
RFC2347 - TFTP Option Extension
RFC2348 - TFTP Blocksize Option
RFC2349 - TFTP Timeout Interval and Transfer Size Options
RFC3617 - Uniform Resource Identifier (URI) Scheme and Applicability
Statement for the Trivial File Transfer Protocol (TFTP)
It supports the following unofficial TFTP Options as described at
http://www.compuphase.com/tftp.htm:
blksize2 - Block size restricted to powers of 2, excluding protocol headers
rollover - Block counter roll-over (roll back to zero or to one)
From the tftp program point of view the following things are changed:
- New commands: "blocksize", "blocksize2", "rollover" and "options"
- Development features: "debug" and "packetdrop"
If you try this tftp/tftpd implementation, please let me know if
it works (or doesn't work) and against which implementaion so I can
get a list of confirmed working systems.
Author: Edwin Groothuis <edwin@FreeBSD.org>
Notes:
svn path=/stable/8/; revision=213038
|
| |
|
|
|
|
|
|
|
|
|
| |
Fix several typos in macros or macro misusage.
Found by: make manlint
Reviewed by: ru
Approved by: philip (mentor)
Notes:
svn path=/stable/8/; revision=213030
|
| |
|
|
|
|
|
|
|
| |
Plug possible memory leak.
Found by: Coverity Prevent
Notes:
svn path=/stable/8/; revision=209303
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Check that gl_pathc is bigger than zero before derefencing gl_pathv.
When gl_pathc == 0, the content of gl_pathv is undefined.
PR: bin/144761
Submitted by: David BERARD <contact davidberard fr>
Obtained from: OpenBSD
Notes:
svn path=/stable/8/; revision=206025
|
| |
|
|
|
|
|
|
|
| |
Remove const'ness from dlerror(3) prototype, for consistency with POSIX.
Approved by: cognet
Notes:
svn path=/stable/8/; revision=205979
|
| |
|
|
|
|
|
|
| |
Support the extended PLT format used when objects have more than 8192
PLT relocations on PPC32.
Notes:
svn path=/stable/8/; revision=205383
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Implement rtld part of the support for -z nodlopen (see ld(1)).
MFC r199877:
Allow to load not-openable dso when tracing. This fixes ldd on such dso or
dso linked to non-openable object.
Remove '\n' at the end of error message.
End comments with dot.
Notes:
svn path=/stable/8/; revision=200645
|
| |
|
|
|
|
|
| |
Fix white space in rtld runtime error printf.
Notes:
svn path=/stable/8/; revision=200512
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In rtld's map_object(), use pread(..., 0) rather than read() to read the
ELF header from the front of the file. As all other I/O on the binary
is done using mmap(), this avoids the need for seek privileges on the
file descriptor during run-time linking.
Sponsored by: Google
Notes:
svn path=/stable/8/; revision=200509
|
| |
|
|
| |
Notes:
svn path=/stable/8/; revision=199980
|
| |
|
|
|
|
|
| |
Flag controlling origin expansion in DT_FLAGS is DF_ORIGIN, not DF_1_ORIGIN.
Notes:
svn path=/stable/8/; revision=199907
|
| |
|
|
|
|
|
|
|
| |
Apply relocations for PIE binary ELF data structures pointers in rtld.
Approved by: re (kensmith)
Notes:
svn path=/stable/8/; revision=198280
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Do the first step in removing lukemftpd from the base system. Disconnect
it from the build.
If you are using the FTP daemon, please consider using the port ftp/tnftpd
which is the same FTP server, but newer and might have more/better
functionality.
This results in us providing only one ftp daemon by default.
Reviewed by: bz
Approved by: imp (mentor, implicit)
MFC after: 3 days
Silence from: obrien
Approved by: re (kib), imp (mentor, implicit)
Notes:
svn path=/stable/8/; revision=196926
|
| |
|
|
|
|
|
|
|
| |
Requested and tested by: jkim
Reviewed by: kan
Approved by: re (kensmith)
Notes:
svn path=/head/; revision=195745
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is not equal to its memory size.
This eliminates unneeded clearing of the text segment that often
happens due to text end not being page-aligned.
For instance,
$ readelf -l /lib/libedit.so.6
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000000 0x00000000 0x00000000 0x139e1 0x139e1 R E 0x1000
LOAD 0x014000 0x00014000 0x00014000 0x00f04 0x00f14 RW 0x1000
DYNAMIC 0x014cc4 0x00014cc4 0x00014cc4 0x000d0 0x000d0 RW 0x4
$ procstat -v $$ (for /bin/sh)
68585 0x28097000 0x280aa000 r-x 6 0 21 14 CN vn /lib/libedit.so.6
68585 0x280aa000 0x280ab000 r-x 1 0 1 0 CN vn /lib/libedit.so.6 <==
68585 0x280ab000 0x280ac000 rwx 1 0 1 0 CN vn /lib/libedit.so.6
Note the splitted map entry marked by '<=='.
Reviewed by: kan
Approved by: re (kensmith)
MFC after: 1 month
Notes:
svn path=/head/; revision=195743
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
compiled with stack protector.
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.
Reviewed by: kib
Approved by: re (kib)
Notes:
svn path=/head/; revision=195697
|
| |
|
|
|
|
|
| |
Approved by: re (impliciti, by approving previos check-in)
Notes:
svn path=/head/; revision=195152
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.
Reviewed by: kib
Approved by: re (kensmith)
Notes:
svn path=/head/; revision=195151
|
| |
|
|
|
|
|
| |
Submitted by: bf1783 googlemail com
Notes:
svn path=/head/; revision=194705
|
| |
|
|
|
|
|
| |
Submitted by: Christoph Mallon
Notes:
svn path=/head/; revision=194689
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
altered through their .init code. This might happen if init
vector calls dlopen on its own and that dlopen causes some not
yet initialized object to be initialized earlier as part of that
dlopened DAG.
Do not reset module reference counts to zero on final fini vector
run when process is exiting. Just add an additional parameter to
force fini vector invocation regardless of current reference count
value if object was not destructed yet. This allows dlclose called
from fini vector to proceed normally instead of failing with handle
validation error.
Reviewed by: kib
Reported by: venki kaps
Notes:
svn path=/head/; revision=194531
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
dlsym seaches using this handle are expected to look for symbol
definitions in all objects loaded at the program start time along
with all objects currently in RTLD_GLOBAL scope.
Discussed with: kib
Reported by: Maho NAKATA
MFC after: 2 weeks
Notes:
svn path=/head/; revision=194298
|
| |
|
|
|
|
|
| |
OpenGL driver on amd64).
Notes:
svn path=/head/; revision=192922
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The makekey utility has been deprecated and will be removed in a future
release of FreeBSD.
Actually removing it was approved back on 10/29/2007 by re (kensmith) but
I dropped the ball on actually removing it. It's doubtful that it's become
more relevant/useful in the intervening time.
Notes:
svn path=/head/; revision=192776
|
| |
|
|
|
|
|
|
|
|
| |
CACHE_LINE_SIZE.
Submitted by: bde
MFC after: 2 weeks
Notes:
svn path=/head/; revision=191303
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=191292
|
| |
|
|
|
|
|
|
|
|
|
| |
that definition in the custom locking code for the run-time linker
rather than local definitions.
Pointed out by: tinderbox
MFC after: 2 weeks
Notes:
svn path=/head/; revision=191291
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
for the mapping by the object' file with the protection and mode of
the first loadable segment over the whole region. Then, it maps other
segments at the appropriate addresses inside the region.
On amd64, due to default alignment of the segments being 1Gb, the
subsequent segment mappings leave the holes in the region, that usually
contain mapping of the object' file past eof. Such mappings prevent
wiring of the address space, because the pages cannot be faulted in.
Change the way the mapping of the ELF objects is constructed, by first
mapping PROT_NONE anonymous memory over the whole range, and then
mapping the segments of the object over it. Take advantage of this new
order and allocate .bss by changing the protection of the range instead
of remapping.
Note that we cannot simply keep the holes between segments, because
other mappings may be made there. Among other issues, when the dso is
unloaded, rtld unmaps the whole region, deleting unrelated mappings.
The kernel ELF image activator does put the holes between segments, but
this is not critical for now because kernel loads only executable image
and interpreter, both cannot be unloaded. This will be fixed later, if
needed.
Reported and tested by: Hans Ottevanger <fbsdhackers beasties demon nl>
Suggested and reviewed by: kan, alc
Notes:
svn path=/head/; revision=190885
|
| |
|
|
|
|
|
|
|
| |
Fix spacing.
Reviewed by: kan
Notes:
svn path=/head/; revision=190883
|
| |
|
|
| |
Notes:
svn path=/head/; revision=190828
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
dlfunc() called dlsym() to do the work, and dlsym() determines the dso
that originating the call by the return address. Due to this, dlfunc()
operated as if the caller is always the libc.
To fix this, move the dlfunc() to rtld, where it can call the internal
implementation of dlsym, and still correctly fetch return address.
Provide usual weak stub for the symbol from libc for static binaries.
dlfunc is put to FBSD_1.0 symver namespace in the ld.so export to
override dlfunc@FBSD_1.0 weak symbol, exported by libc.
Reported, analyzed and tested by: Tijl Coosemans <tijl ulyssis org>
PR: standards/133339
Reviewed by: kan
Notes:
svn path=/head/; revision=190673
|
| |
|
|
| |
Notes:
svn path=/head/; revision=190624
|
| |
|
|
| |
Notes:
svn path=/head/; revision=190601
|