Re: installing ld-elf.so.1

From: Erik Trulsson <ertr1013_at_student.uu.se>
Date: Fri, 2 Sep 2005 00:51:28 +0200
On Thu, Sep 01, 2005 at 11:49:32PM +0200, Benjamin Lutz wrote:
> Hello,
> 
> While examining my system (FreeBSD 6.0-BETA3 amd64) and removing the old
> libs from before the version bump, I noticed that the time stamp on
> /libexec/ld-elf.so.1 does not match that of other system files. The date
> leads me to believe that my current ld-elf.so.1 is a remainder of a
> previous installation (its date matches the date of libm.so.3, which was
> recently bumped to libm.so.4).

That belief is most likely incorrect.
ld-elf.so.1 is installed by 'install -C', and the -C flags for install(1)
is documented as:
     -C      Copy the file.  If the target file already exists and the files
	     are the same, then don't change the modification time of the tar-
	     get.  If the target's file flags and mode need not to be changed,
	     the target's inode change time is also unchanged.

I.e. the timestamp for ld-elf.so.1 will not match that of your other files,
unless there there has actually been some changes to ld-elf.so.1 since your
last install.



> 
> While trying to figure out why the new ld-elf.so.1 (which appears to
> have been built correctly) isn't installed. I finally arrived at this point:
> 
> # cp -p /usr/obj/usr/src/libexec/rtld-elf/ld-elf.so.1 /libexec
> cp: /libexec/ld-elf.so.1: Text file busy
> #
> 
> (This is in single user mode. The result is the same if I use
> /rescue/cp, which is statically linked.)
> 
> The open(2) manpage has this to say about it:
> 
>   [ETXTBSY]      The file is a pure procedure (shared text) file that
>                  is being executed and the open() system call requests
>                  write access.
> 
> So, my question: How can Install the new ld-elf.so.1?

Rename or delete the old file, and then copy the new file (a file which is
being executed cannot be modified, but it can be deleted.)  This is most
easily done by install(1), which is what 'make installworld' uses to to
install files.




-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013_at_student.uu.se
Received on Thu Sep 01 2005 - 20:51:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:42 UTC