On Tuesday 31 May 2011 16:04:28, Simon Marlow wrote: > On 31/05/2011 14:53, Daniel Fischer wrote: > > Well, compiling and running a simple test programme that calls > > bfd_init() works here without linking in libz, so I guess that test > > wouldn't detect the dependency even if it actually runs the > > executable. > > That's very mysterious. Perhaps bfd_init doesn't pull in anything that > has the libz dependency,
That's what I think. > and you have to call some other function in the > bfd library instead. Here's a fragment of code in the RTS that calls > bfd functions: > > bfd_init(); > abfd = bfd_openr(name, "default"); > if (abfd == NULL) { > barf("can't open executable %s to get symbol table", name); > } > if (!bfd_check_format_matches (abfd, bfd_object, &matching)) { > barf("mismatch"); > } calling bfd_openr alone produces tons of undefined references, I've no idea what libraries I'd have to link with also :( > > > Cheers, > Simon _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users