Thread: _dl_runtime_resolve,_dl_lookup_symbol_x ,dl_new_hash functionality doubt

  1. #1
    Registered User
    Join Date
    Nov 2012
    Posts
    17

    _dl_runtime_resolve,_dl_lookup_symbol_x ,dl_new_hash functionality doubt

    i am using a static library which is actually calling application constructor. I am building the application with this library statically. this library is having many calls to the inbuilt function like memcpy, strcpy etc. when application calls strcpy memcpy etc the time taken by my library is more. it is worse in the case of strcpy. strcpy if it is having a defnition in my library or if it is not having a defnition in my library if i am compiling with the library and application statically the time taken is more. when i checked in the GDB when a strcpy call is comming first time in the application it calls these functions and these functions will give the libc.so.6 function address for strcpy. if i am giving a static string inside the strcpy funtion, then this functions will resolve it into memcpy and calls memcpy. my doubht is like when i am linking with my library actually these functions will some how give my function address to the application. so inorder to increase the speed i am thinking is there any posibility to configure these function so that it finds my library fast.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,656
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,318
    Quote Originally Posted by josymadamana View Post
    if i am giving a static string inside the strcpy funtion, then this functions will resolve it into memcpy and calls memcpy.
    That kind of optimisation is only possible when the function is inlined at the point of call. It cannot be done across a module boundary, so you are barking up the wrong tree with your line of thinking.
    Forget trying to make these individual calls faster from the static lib, and instead think about reducing the number of inter-module calls.

    Quit spamming other forums and learn to write proper sentences with a captial letter. You aren't a four-year old are you?!
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

  4. #4
    Registered User
    Join Date
    Nov 2012
    Posts
    17
    thanks a million for ur HELPFUL information... thats what i can say... i need to fix this some how. so i had posted in multiple forum. sorry for the inconvenience caused...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How can this WinForm functionality be implemented?
    By y99q in forum C# Programming
    Replies: 7
    Last Post: 02-29-2012, 12:23 AM
  2. Questions about cursor functionality
    By kantze in forum Windows Programming
    Replies: 4
    Last Post: 08-22-2008, 06:42 AM
  3. Replies: 7
    Last Post: 09-24-2006, 10:13 AM
  4. Drag and drop functionality
    By tazz25 in forum Tech Board
    Replies: 5
    Last Post: 07-15-2006, 10:47 PM
  5. Disabling Some Autoscroll Functionality
    By McClamm in forum C# Programming
    Replies: 3
    Last Post: 09-10-2004, 01:36 PM