Your message dated Sat, 1 Mar 2014 20:23:40 +0100
with message-id <[email protected]>
and subject line Re: Bug#698007: mklibs: Fix undefined reference to 
__dso_handle problem encountered with librt.so
has caused the Debian Bug report #698007,
regarding mklibs: Fix undefined reference to __dso_handle problem encountered 
with librt.so
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
698007: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698007
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: mklibs
Tags: patch

----- Forwarded message from Joe Seymour <[email protected]> -----

Date: Sat, 12 Jan 2013 13:13:56 +0000
From: Joe Seymour <[email protected]>
To: [email protected]
Subject: [PATCH] Fix undefined reference to __dso_handle problem encountered 
with librt.so
X-Mailing-List: <[email protected]> archive/latest/170862
X-CRM114-Status: Good  ( pR: 18.8078 )

[Please CC me on any responses]

When using mklibs on a simple test application I encountered the following error
when mklibs attempts to build a reduced librt.so:

/usr/lib64/libpthread_nonshared.a(pthread_atfork.oS): relocation R_X86_64_PC32
against undefined hidden symbol `__dso_handle' can not be used when making a
shared object
ld: final link failed: Bad value

Examining the link map for librt.so, when built by EGLIBC, I see the
__dso_handle definition used by it comes from crtbeginS.o, which isn't included
in the link because mklibs passes -nostartfiles.

In order to create a reduced librt.so that as closely as possible resembles the
original, it makes sense to include crtbeginS.o when dealing with librt.so.1.
This patch does that. crtendS.o is included as a requisite of crtbeginS.o.

Joe

diff --git a/src/mklibs b/src/mklibs
index 14ca02a..0b62136 100755
--- a/src/mklibs
+++ b/src/mklibs
@@ -617,6 +617,17 @@ while 1:
                 extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o")
                 symbols.add(ProvidedSymbol('__dso_handle', None, None, True))

+            if soname in ("librt.so.1"):
+                crtbegin = command(target + "gcc",
+                                   " ".join(gcc_options),
+                                   "-print-file-name=crtbeginS.o");
+                crtend = command(target + "gcc",
+                                 " ".join(gcc_options),
+                                 "-print-file-name=crtendS.o");
+                extra_pre_obj.append(" ".join(crtbegin))
+                extra_post_obj.append(" ".join(crtend))
+                symbols.add(ProvidedSymbol('__dso_handle', None, None, True))
+
             map_file = find_pic_map(library)
             if map_file:
                 extra_flags.append("-Wl,--version-script=" + map_file)


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]


----- End forwarded message -----

-- 


Attachment: signature.asc
Description: Digital signature


--- End Message ---
--- Begin Message ---
Cyril Brulebois <[email protected]> (2014-03-01):
> If you're still having any issues with it, it would be nice to describe
> a complete test case.

[email protected]                                 
  SMTP error from remote mail server after pipelined DATA:
  host mx0a-0013c101.pphosted.com [208.84.65.186]:        
  550 5.1.1 User Unknown                                  

So closing…

Mraw,
KiBi.

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply via email to