Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have an application that was linked with a static library. I would like to relink that executable with a new version of the static library, but without respecifying everything else that went into the application. I have tried placing the new library both before & after the exec name, but the generated map shows that "ld" used the libbrary from prog_old.
> ld -o prog_new libnew.a prog_old -M --cref
> ld -o prog_new prog_old libnew.a -M --cref
I've read the "ld" MAN pages and browsed through the "ld" info, but cannot find anything on how to do that. I also browsed around on the web, and though I found quite a number of "how-to" documents on linking applications, most of them are more geared to shared libraries, than to static libraries.
If prog_old is a statically linked executable, so with all symbols resolved, why would the linker even bother to look at the new library? Do prog_new and prog_old differ at all?
Since libnew.a differs from the original static library, yes, prog_old and prog_new do differ.
I used to be able to do this a long time ago on IBM's AIX OS, so I thought it might be possible on Linux. From what you said, it sounds like we cannot do that on Linux.
From what you said, it sounds like we cannot do that on Linux.
I wouldn't take it as the word of authority on this You could try asking in the programming section where they might have some more hardcore knowledge.
I'm new to these forums (I've had an ID for a while, but never used it). I don't see one that is explicitly called "Programming". To exactly which forum are you referring?
(but I see now it's not Linux specific). What you are asking for sounds like something that might be useful in a commercial closed-source environment. I just never heard of it in a linux context.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.