[Bug 900381] Re: Missing symbols in openssl 1.0.0e-2ubuntu4

Andreas Moog andreas-launchpad at warperbbs.de
Sun Dec 25 17:47:15 UTC 2011


Since precise, --as-needed is the default linker option and command line
arguments order matters:

$ cat test.c
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <openssl/md5.h>

const char *string = "asdfghjklpoiuztreq";

int main()
{
  unsigned char result[MD5_DIGEST_LENGTH];

  MD5(string, strlen(string), result);
  return EXIT_SUCCESS;
}

$ gcc -c test.c
$ ld --as-needed -lcrypto test.o
ld: warning: cannot find entry symbol _start; defaulting to 00000000004000e8
test.o: In function `main':
test.c:(.text+0x53): undefined reference to `MD5'
test.c:(.text+0x6c): undefined reference to `__stack_chk_fail'
$

vs.

$ ld --as-needed test.o -lcrypto
ld: warning: cannot find entry symbol _start; defaulting to 0000000000400300
$

** Changed in: openssl (Ubuntu)
       Status: New => Incomplete

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to openssl in Ubuntu.
https://bugs.launchpad.net/bugs/900381

Title:
  Missing symbols in openssl 1.0.0e-2ubuntu4

Status in “openssl” package in Ubuntu:
  Incomplete

Bug description:
  There appear to be missing symbols in the Ubuntu build of 1.0.0e in
  Precise:

  http://pastebin.com/dNNw98sf

  "Missing" might not be the best word, as they are there:

  brian at brian-desktop:~$ nm /usr/lib/x86_64-linux-gnu/libcrypto.a |grep MD5
  nm: ebcdic.o: no symbols
  0000000000000230 T MD5_Final
  0000000000000360 T MD5_Init
  0000000000000220 T MD5_Transform
  0000000000000000 T MD5_Update
  0000000000000000 R MD5_version
  0000000000000000 T MD5
                   U MD5_Final
                   U MD5_Init
                   U MD5_Update
                   U MD5_Final
                   U MD5_Init
                   U MD5_Update

  However, when attempting to link with -lcrypto and -lssl, the pastebin
  error above is thrown.

  I downloaded 1.0.0e from Debian SID and it does NOT display the same
  problem - it links fine.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssl/+bug/900381/+subscriptions




More information about the foundations-bugs mailing list