https://sourceware.org/bugzilla/show_bug.cgi?id=22011

            Bug ID: 22011
           Summary: glibc math/test-matherr.c fails with gold
           Product: binutils
           Version: 2.30 (HEAD)
            Status: NEW
          Severity: normal
          Priority: P2
         Component: gold
          Assignee: ccoutant at gmail dot com
          Reporter: markus at trippelsdorf dot de
                CC: ian at airs dot com
  Target Milestone: ---

markus@x4 math % cat test.i
extern double acos(double __x) __attribute__((__nothrow__));

typedef enum {
  _IEEE_ = -1,
  _SVID_,
  _XOPEN_,
  _POSIX_,
  _ISOC_
} _LIB_VERSION_TYPE;

extern _LIB_VERSION_TYPE _LIB_VERSION;

struct exception {
  int type;
  char *name;
  double arg1;
  double arg2;
  double retval;
};

__asm__(".symver matherr,matherr@GLIBC_2.2.5");
__asm__(".symver _LIB_VERSION,_LIB_VERSION@GLIBC_2.2.5");

static int fail = 1;

int matherr(struct exception *s) {
  __builtin_printf("matherr is working\n");
  fail = 0;
  return 1;
}

int main() {
  _LIB_VERSION = _SVID_;
  acos(2.0);
  return fail;
}

markus@x4 math % gcc test.i -fuse-ld=bfd -lm
markus@x4 math % ./a.out
matherr is working

markus@x4 math % gcc test.i -fuse-ld=gold -lm
markus@x4 math % ./a.out
acos: DOMAIN error

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to