Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6093919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:37:02+00:00 2026-05-23T12:37:02+00:00

For convenience I added the relevant manpages below. My (mis)understanding first: If I need

  • 0

For convenience I added the relevant manpages below.

My (mis)understanding first: If I need to separate options with ,, that means that the second -Wl is not another option because it comes before , which means it is an argument to the -rpath option.

I don’t understand how -rpath can have a -Wl,. argument!

What would make sense in my mind would be this:

-Wl,-rpath .

This should invoke -rpath linker option with the current directory argument.


man gcc:

-Wl,option

Pass option as an option to the
linker. If option contains commas, it
is split into multiple options at the
commas. You can use this syntax to
pass an argument to the option. For
example, -Wl,-Map,output.map passes
-Map output.map to the linker. When
using the GNU linker, you can also get
the same effect with
`-Wl,-Map=output.map’.

man ld:

-rpath=dir

Add a directory to the
runtime library search path. This is
used when linking an ELF executable
with shared objects. All -rpath
arguments are concatenated and passed
to the runtime linker, which uses them
to locate shared objects at runtime.
The -rpath option is also used when
locating shared objects which are
needed by shared objects explicitly
included in the link;

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T12:37:02+00:00Added an answer on May 23, 2026 at 12:37 pm

    The -Wl,xxx option for gcc passes a comma-separated list of tokens as a space-separated list of arguments to the linker. So

    gcc -Wl,aaa,bbb,ccc
    

    eventually becomes a linker call

    ld aaa bbb ccc
    

    In your case, you want to say “ld -rpath .“, so you pass this to gcc as -Wl,-rpath,. Alternatively, you can specify repeat instances of -Wl:

    gcc -Wl,aaa -Wl,bbb -Wl,ccc
    

    Note that there is no comma between aaa and the second -Wl.

    Or, in your case, -Wl,-rpath -Wl,..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For convenience, I am using a helper class that allow to display a wait
I am developing some convenience wrappers around another software package that defines a bash
I often use convenience functions that return pointers to static buffers like this: char*
In Objective-C there is the Alloc/Init metaphor. They've also added a shared convenience method
I've added a mouseup event listener to a span that will increment the value
I have an BufWritePre hook added to my .vimrc that trims trailing whitespace before
I have a convenience class for encoding URI's. In it I've created three methods
For the sake of convenience I am trying to assign multiple values to a
Is @selector a convenience syntax for some sort of longer C syntax, or is
With regards to security and convenience which cookies are better the PHP ones or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.