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 7877363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:20:56+00:00 2026-06-03T03:20:56+00:00

I’m trying to obtain and save a stack trace to a file after I

  • 0

I’m trying to obtain and save a stack trace to a file after I get SEGSEGV inside my shared library. The shared library is a plugin for a closed-source product. All this works on production and I don’t have a direct access to it.

My code catches SIGSEGV signal, prints stack-trace and exits. I have something like this:

/opt/ecelerity/libexec/site/ec_attachextensions.so [0x2aecc2019f11]
/opt/ecelerity/libexec/site/ec_attachextensions.so [0x2aecc2019f11]
/opt/ecelerity/libexec/site/ec_attachextensions.so [0x2aecc2019fee]
/opt/ecelerity/libexec/site/ec_attachextensions.so [0x2aecc201a587]

/opt/ecelerity/sbin/ecelerity [0x501235]

/opt/ecelerity/sbin/ecelerity(sieve_seng_execute+0x82) [0x506d32]
/opt/ecelerity/libexec/validate/sieve.so [0x2aecc2862c9e]
/opt/ecelerity/sbin/ecelerity(validate_data+0xa5) [0x4a90d5]
/opt/ecelerity/sbin/ecelerity(esmtp_message_factory+0x154e) [0x46eace]
/opt/ecelerity/sbin/ecelerity(schedule_event_and_dispatch+0x6a) [0x49c59a]

The problem is that I cannot have the names of functions and offsets inside them for a shared
library. As I understand I can find function name/file name for a given address with help of
addr2line utility after I will find library offset in /proc/$PID/maps.

After that I’m executing something like that:

addr2line -e /opt/ecelerity/libexec/site/ec_attachextensions.so (LIBRARY_OFFSET_FROM_MAPS_FILE - 0x2aecc2019f11)

Where 0x2aecc2019f11 is the address from the stack trace above. I was wondering is there any way I can get function names in a stack trace without touching maps file? In other words how can I program it? Would dladdr help here (dladdr unable to get function names from addresses provided by backtrace function in my case)?

  • 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-06-03T03:20:58+00:00Added an answer on June 3, 2026 at 3:20 am

    the backtrace code uses approximately the same mechanism as dladdr to determine function names.

    if your library is built using either a linker map file (that defines what is being exported, and can be used to restrict the visibility of all other items), or the -fvisibility=hidden with explicit visible symbols, then it obscures the symbols so that they will not appear in the backtrace output.

    Workarounds are to compile without using a map file that restricts the visibility of all the symbols in the library, or to build with the -fvisibility=default. That will get backtrace to work without any effort on your behalf.

    To get it to work without doing this, you need to load up the local symbol table from the .so and determine the symbol locations using a mechanism similar to addr2line. The mechanism to do this is to make use of libelf1. to read the local symbol table.

    … This of course requires that the table has not been stripped from the file. If that is the case, then none of these tricks matter as the .so simply does not come with the information.

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

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
I am trying to render a haml file in a javascript response like so:
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.