Bug 993 - fail to link if address of libc function taken in n64
Summary: fail to link if address of libc function taken in n64
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: pre-2.15
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-06 22:00 UTC by Shay Gal-On
Modified: 2022-06-22 06:23 UTC (History)
2 users (show)

See Also:
Host: any
Target: mips64-linux-gnu
Build: any
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shay Gal-On 2005-06-06 22:00:40 UTC
The following:
#include <stdlib.h>

void (*testme)(void *) = free;

int main()
{
        return 0;
}


Fails with "assertion fail" when trying to link after compiling with -mabi=64.
Works fine with o32 or n32. Same issue with taking address of malloc etc...
Can take address of non-glibc functions just fine.

I have not verified with later incarnations of binutils yet.
Comment 1 drow@false.org 2005-06-07 03:33:05 UTC
Subject: Re:  New: fail to link if address of libc function taken in n64

On Mon, Jun 06, 2005 at 10:00:41PM -0000, shay_gal-on at pmc-sierra dot com wrote:
> Fails with "assertion fail" when trying to link after compiling with -mabi=64.
> Works fine with o32 or n32. Same issue with taking address of malloc etc...
> Can take address of non-glibc functions just fine.
> 
> I have not verified with later incarnations of binutils yet.

Please do - n64 support for MIPS/Linux did not really work until 2.15,
and now 2.16 has been released.

Comment 2 Alan Modra 2019-11-22 05:07:17 UTC
Fixed a long time ago.