![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hp-ux linker option -c | roopa_v | HP-UX | 0 | 05-12-2009 10:04 AM |
| G++ Linker Error | ASRRAJ | Linux | 1 | 06-15-2008 12:41 AM |
| CPP Linker Error | ASRRAJ | Software Releases - RSS News | 0 | 06-09-2008 04:05 AM |
| linker problem | suman_jakkula | AIX | 0 | 08-29-2006 07:38 AM |
| Linker (ld) | rajashekaran | UNIX for Dummies Questions & Answers | 1 | 02-14-2003 02:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
GCC: Choose my own linker
Hi,
I do not use the default linker, and instead us another one and pass this argument -Wl,--dynamic-linker=<path to linker> to gcc when compiling. However, what happens if the linker is not under /lib and /lib64 and I am not able to create a symlink to the linker in /lib or /lib64 due to no access to sudo rights. So instead I pass this -Wl,--dynamic-linker=/home/myhome/ld-custom.so Will the linker be properly found when running the program on say some other computer where the linker is not located where it was in link-time? It will be located under /lib64 on target. |
|
||||
|
Ok. I was just thinking that the path will be hardcoded in the executable binary because of I do not understand how the executable binary will figure out which linker to use in runtime otherwise. Maybe just the name and not the path will be hardcoded? But I have not tested. So I am speculating.
---------- Post updated 10-29-09 at 03:20 AM ---------- Previous update was 10-28-09 at 09:42 PM ---------- You are right. Didn't think about that the linker does not really need to be available during compilation. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|