Closed
Bug 217501
Opened 22 years ago
Closed 22 years ago
Use sane libpath in NSPR libraries
Categories
(NSPR :: NSPR, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
4.4.1
People
(Reporter: pkwarren, Assigned: wtc)
Details
Attachments
(1 file)
|
647 bytes,
patch
|
wtc
:
review+
asa
:
approval1.5+
|
Details | Diff | Splinter Review |
NSPR does not currently set the libpath when creating libraries, and so it often
looks like the following:
pkw@ut:/usr/mozilla/base/ > dump -H libplc4.so
libplc4.so:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000036 0x000000b5 0x0000006c
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000004 0x00000dac 0x000002ca 0x00000e18
***Import File Strings***
INDEX PATH BASE MEMBER
0 /home/pkw/sb/moz14/src/nsmoz/mozilla/dist/lib:/usr/lib:/lib
1 libnspr4.so
2 libc_r.a shr.o
3 librtl.a shr.o
This means that if LIBPATH is not set, the libplc4.so library will look by
default in /home/pkw/sb/moz14/src/nsmoz/mozilla/dist/lib for the libraries
libnspr4.so, libc_r.a, and librtl.a. All NSPR libraries should be created with
the standard AIX libpath (/usr/lib:/lib) and applications should manually set
the LIBPATH variable if they would like to look for libraries in non standard
locations.
| Reporter | ||
Comment 1•22 years ago
|
||
| Reporter | ||
Updated•22 years ago
|
Attachment #130488 -
Flags: review?(wtc)
| Assignee | ||
Comment 2•22 years ago
|
||
Comment on attachment 130488 [details] [diff] [review]
Patch v1
r=wtc.
Is there a way to tell the linker to use the standard AIX libpath?
Will the standard AIX libpath (/usr/lib:/lib) ever change?
Attachment #130488 -
Flags: review?(wtc) → review+
| Assignee | ||
Comment 3•22 years ago
|
||
If you need this in Mozilla 1.5 Beta, could you request drivers'
approval?
| Assignee | ||
Comment 4•22 years ago
|
||
It seems that the directory that we pass to the -L linker flag at build time
is added to the beginning of the libpath unless the -blibpath flag is used,
correct?
| Reporter | ||
Comment 5•22 years ago
|
||
Some answers to your questions:
1) Is there a way to tell the linker to use the standard AIX libpath?
It is possible to use the -bnolibpath option to the linker:
nolibpath
Overrides any previous library path generated by the -L flag or specified by the
libpath option. Instead, the default library path information is written in the
loader section of the output file. The default library path information is the
value of the LIBPATH environment variable if it is defined, and /usr/lib:/lib
otherwise.
The reason I did not use this is if someone has set the LIBPATH variable, then
Mozilla will use that as the libpath in all of the shared libraries/binaries it
creates. I felt it was safer to manually specify the libpath.
2) Will the standard AIX libpath (/usr/lib:/lib) ever change?
I asked an expert on AIX linking/loading and this was his comment:
"I can't imagine why it would. What you're seeing more of now is symlinks in
/usr/lib that point to other places. So much depends upon that, I could not
imagine making a change...."
3) It seems that the directory that we pass to the -L linker flag at build time
is added to the beginning of the libpath unless the -blibpath flag is used, correct?
This is true - from the ld documentation:
-LDirectory
Adds Directory to the list of search directories used for finding libraries
designated by the -l (lowercase letter L) flag. The list of directories,
including the standard library directories, is also recorded in the output
object file loader section for use by the system loader unless you use the
-blibpath or -bnolibpath option. You can repeat this flag.
For more information, see the ld documentation here:
http://publib16.boulder.ibm.com/doc_link/en_US/a_doc_lib/cmds/aixcmds3/ld.htm
| Reporter | ||
Comment 6•22 years ago
|
||
Comment on attachment 130488 [details] [diff] [review]
Patch v1
Requesting drivers approval for Mozilla 1.5. This is a low risk, AIX only
patch.
Attachment #130488 -
Flags: approval1.5?
Comment 7•22 years ago
|
||
Comment on attachment 130488 [details] [diff] [review]
Patch v1
a=asa (on behalf of drivers) for checkin to Mozilla 1.5
Attachment #130488 -
Flags: approval1.5? → approval1.5+
| Assignee | ||
Comment 8•22 years ago
|
||
Fix checked into the NSPR tip and NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.5).
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Target Milestone: --- → 4.4.1
You need to log in
before you can comment on or make changes to this bug.
Description
•