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

  • Home
  • SEARCH
  • 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 1026381
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T12:04:25+00:00 2026-05-16T12:04:25+00:00

Context: I can create a shared object library which is linked to a static

  • 0

Context: I can create a shared object library which is linked to a static library without any problems on 32bit linux. When I attempt the same build on 64bit linux, I see this linker error:

  • relocation R_X86_64_32S against `a local symbol’ can not be used when making a shared object; recompile with -fPIC

This error is quite common on the web. The solution is to compile the statically linked library with position independent code (-fPIC).

What I do not understand is why this is not required for the 32bit build. Can anyone help out?

  • 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-16T12:04:26+00:00Added an answer on May 16, 2026 at 12:04 pm

    Ok the answer is described in detail here: http://www.technovelty.org/code/c/amd64-pic.html.

    The basic gist of the explanation is that the i386 architecture implicitly dereferences the frame pointer for each function (explained on the last paragraph of the linked page). This process incurs some extra overhead so in the new 64-bit architectures, this dereferencing overhead was eliminated as an optimization.

    The consequence of this optimization from a linking perspective was that unless 64-bit code is explicitly compiled as position independent code, it will produce code that is hard-coded with offsets for its execution context.

    This is an imperfect explanation of the content in the linked page but it suffices for my purposes.

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

Sidebar

Related Questions

I can create a menu item in the Windows Explorer context menu by adding
How can I find out which node in a tree list the context menu
When a user request comes in, I can use Context.Request.UserHostAddress to get the user's
How can I tell if a method is running in the context of an
Can someone describe what a symbol table is within the context of C and
Can someone provide a simple explanation of methods vs. functions in OOP context?
OK, first for context look at the Windows desktop; You can take items (folders,
How can I get static content on Apache to be {cached by browser} and
Say you're coding some kind of web application. Something where people can contribute content,
How can I go about hosting flash content inside a WPF form and still

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.