Fernando Vilas wrote:
> If I modify the Trusted Directories with this command:
> 
> crle -c /var/ld/ld.config -s /lib/secure:/usr/lib/secure
> 
> everything still works, but if I modify the Default Library Path with:
> 
> crle -c /var/ld/ld.config -l /lib:/usr/lib
> 
> Some commands fail, such as ps, with this output:
> 
> ld.so.1: ps: fatal: /usr/lib/libc.so.1: wrong ELF class: ELFCLASS32
> Killed
> 
> Notice that the paths being set match the system defaults.  The crle output 
> is identical before and after being set, with the exception of "(system 
> default)" not being appended to the line if it is set by the above commands.
> 
> Is there something special about the default settings that is not shown in 
> the output?  What am I missing?

Odd.

Note, ps(1) like a number of commands, will exec its 64-bit counterpart:

chaz1 407. truss -ftexec ps
5112:   execve("/usr/bin/ps", 0x08047A48, 0x08047A50)  argc = 1
5112:   execve("/usr/bin/amd64/ps", 0x08047A48, 0x08047A50)  argc = 1
    PID TTY         TIME CMD
  5112 pts/7       0:00 ps

Which means there are two different processes that should read two
different configuration files:

chaz1 409. LD_DEBUG=basic ps
05588:
05588: hardware capabilities - 0x25ff7  [ AHF SSE3 SSE2 SSE FXSR AMD_3DNowx 
AMD_3DNow AMD_MMX MMX CMOV AMD_SYSC CX8 TSC FPU ]
05588:
05588:
05588: configuration file=/var/ld/ld.config: [ ELF-DEFAULT-LIBPATH ]
05588:
05588:
05588: 1:
05588: 1: transferring control: /usr/bin/ps
05588: 1:
05588:
05588: hardware capabilities - 0x25ff7  [ AHF SSE3 SSE2 SSE FXSR AMD_3DNowx 
AMD_3DNow AMD_MMX MMX CMOV AMD_SYSC CX8 TSC FPU ]
05588:
05588:
05588: configuration file=/var/ld/64/ld.config: unable to process file
05588:
05588:
05588: 1:
05588: 1: transferring control: /usr/bin/amd64/ps
05588: 1:
    PID TTY         TIME CMD
  5588 pts/7       0:00 ps

Now, if you set LD_CONFIG=/var/ld/ld.config then you'll force all
processes to read the same configuration file .... and that would be bad:

05588: 1:
chaz1 410. LD_CONFIG=/var/ld/ld.config LD_DEBUG=basic ps
10122:
10122: hardware capabilities - 0x25ff7  [ AHF SSE3 SSE2 SSE FXSR AMD_3DNowx 
AMD_3DNow AMD_MMX MMX CMOV AMD_SYSC CX8 TSC FPU ]
10122:
10122:
10122: configuration file=/var/ld/ld.config: [ ELF-DEFAULT-LIBPATH ]
10122:
10122:
10122: 1:
10122: 1: transferring control: /usr/bin/ps
10122: 1:
10122:
10122: hardware capabilities - 0x25ff7  [ AHF SSE3 SSE2 SSE FXSR AMD_3DNowx 
AMD_3DNow AMD_MMX MMX CMOV AMD_SYSC CX8 TSC FPU ]
10122:
10122:
10122: configuration file=/var/ld/ld.config: incompatible ELF class, byte 
order, 
or machine architecture
10122:
10122:
10122: 1:
10122: 1: transferring control: /usr/bin/amd64/ps
10122: 1:
    PID TTY         TIME CMD
  2189 pts/7       0:00 ksh

However, I think the configuration compatibility check above is new to Nevada.
Depending on your release, the configuration file might have been read by the
64-bit process and then the search paths used to try and find 64-bit libraries.

-- 

Rod.

Reply via email to