New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support IBM AIX on POWER #6677

Merged
merged 39 commits into from Feb 5, 2018

Conversation

Projects
None yet
8 participants
@NattyNarwhal
Contributor

NattyNarwhal commented Jan 25, 2018

Patch mostly complete

This is a patch to add support for AIX, the IBM Unix. The patch has been tested on AIX 6.1 TL9 on a POWER6 system, with GCC 6.3 sourced from Bull.

The port is capable of compiling itself and being installed. There may be minor issues, but these can be shaken out.

Tip: When using GCC, put -gxcoff in your CFLAGS to generate COFF (the actual AIX binary format) debugging info. Unfortunately, dbx still snarfs on gcc compiled programs and gdb can't load cores either way; but it does let you run under gdb fine.

NattyNarwhal added some commits Jan 20, 2018

Get autotools scripts for Mono and Boehm to recognize i
PASE is most similar to AIX, and perhaps I assume other commercial
Unices, as well as PowerPC Linux, so grab variables from them as
needed.

With this, we get glib failing to build due to missing mkdtemp.
Add hack to gfile-unix.c to work around flawed AIX header
From comment:

/* HACK: the preprocessor will not give us mkdtemp no matter
   what and Mono (for good reason) does
   "-Werror-implicit-function-declaration" so we error out;
   instead declare mkdtemp here; the linker will find mkdtemp
   anwyays. libuv has had similar issues, but they just ignore
   the compiler warning instead of failing on it.

   See: github.com/libuv/libuv/pull/740 */
Initial work to get JIT working on AIX
* uncertain about NIP; is IAR the right register? need review from
  PPC asm people

* needs calling convention work; AIX does NOT use ELF
Fix lack of casting on sigcontext macros, fix errnos for AIX
* AIX doesn't distinguish between ENOTEMPTY and EEXIST without a
  define. Handle this case with a conditional cpp directive..

* When ctx is a void pointer, dereferencing as a struct will fail.
  Handle this case with a cast.
Implement stack boundaries check for AIX, volume info func
* vol info should be like other Unix, just needs to bridge ifdef

* highly uncertain for the bounds checking, needs further review
In boehm-gc.c, don't use pthread_getattr_np on AIX even if available
It's not available on IBM i, and even if available, toolchains for AIX
may "helpfully" swap out system headers with variants that remove
functions like pthread_getattr_np.
Don't use "-export-dynamic" on non-GNU ld
IBM ld considers "-e" to be a flag for setting the entry point.
Detect non-GNU ld, and offer equivalents when possible.

The makefile in mini had to be changed as a result due to
hardcoded flags.
Use pthread-stop-world.c on AIX
Remove an ifdef that gated this off to AIX. It seems the old AIX
specific files shouldn't be used, and that the changelog for libgc
says pthread should work fine on AIX instead; yet it was blocked.
Restore this, as it compiles and seems to let mono-boehm link fine.
AIX workarounds for some of support dir
* fstab on AIX is there, but defines a struct more like other
  platforms' checklist struct.

* AIX, like macOS and some BSDs, doesn't define some serial types.

* psignal is another victim of GNU; even then it isn't in PASE
  headers anyways
Replacement function body for syslog2 on vsyslog-less platforms
AIX lacks vsyslog; detect in autoconf and act appropriately.
Fix problematic stack management on AIX
this gets us past ifdefs, after much handwringing

* get the right end of the stack; r1/stack pointer is on the wrong
  end and ustk is just plain broken

* AIX doesn't seem to like the semantics of the mmap call valloc
  does here; either we're allocating into an area we shouldn't be
  or we're not passing the right flags. Until then, learn to live
  without the stack guard?
Show outdated Hide outdated mono/utils/mono-mmap.c
@@ -351,7 +351,8 @@ mono_mprotect (void *addr, size_t length, int flags)
memset (addr, 0, length);
#else
memset (addr, 0, length);
#ifdef HAVE_MADVISE
/* AIX doesn't have MADV_FREE */
#if defined(HAVE_MADVISE) && !defined(_AIX)

This comment has been minimized.

@lewurm

lewurm Jan 25, 2018

Member

why isn't HAVE_MADVISE detected properly by autotools?

@lewurm

lewurm Jan 25, 2018

Member

why isn't HAVE_MADVISE detected properly by autotools?

This comment has been minimized.

@NattyNarwhal

NattyNarwhal Jan 25, 2018

Contributor

We do have that function, but AIX doesn't support the MADV_FREE flag.

@NattyNarwhal

NattyNarwhal Jan 25, 2018

Contributor

We do have that function, but AIX doesn't support the MADV_FREE flag.

This comment has been minimized.

@jaykrell

jaykrell Jan 27, 2018

Member

is it a define (or enum or const int) on all/most systems? i.e. can you ifdef the flag?

@jaykrell

jaykrell Jan 27, 2018

Member

is it a define (or enum or const int) on all/most systems? i.e. can you ifdef the flag?

Show outdated Hide outdated mono/utils/mono-proclib.c
defined, so undef */
#if defined(_AIX) && defined(_ALL_SOURCE)
#undef hz
#endif

This comment has been minimized.

@lewurm

lewurm Jan 25, 2018

Member

I would recommend to rename occurrences of hz in this file instead

@lewurm

lewurm Jan 25, 2018

Member

I would recommend to rename occurrences of hz in this file instead

LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
# GNU specific option, this confuses IBM ld, but do offer alternatives when possible
if test $lt_cv_prog_gnu_ld = yes; then
LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"

This comment has been minimized.

@lewurm

lewurm Jan 25, 2018

Member

not sure if that works with the linker on macOS too.

@lewurm

lewurm Jan 25, 2018

Member

not sure if that works with the linker on macOS too.

This comment has been minimized.

@NattyNarwhal

NattyNarwhal Jan 25, 2018

Contributor

I wasn't sure if LLVM's linker supports it; has Apple moved to that yet? AFAIK, they're still using GNU binutils even with clang. In any case, this could be extended to check for LLVM's linker and use the proper flag (maybe the same as GNU's) or any other non-GNU linker, really.

@NattyNarwhal

NattyNarwhal Jan 25, 2018

Contributor

I wasn't sure if LLVM's linker supports it; has Apple moved to that yet? AFAIK, they're still using GNU binutils even with clang. In any case, this could be extended to check for LLVM's linker and use the proper flag (maybe the same as GNU's) or any other non-GNU linker, really.

This comment has been minimized.

@jaykrell

jaykrell Jan 27, 2018

Member

I believe Apple has a very old GNU binutils fork, forked in Next days. There is lld but I don't think they use it.

@jaykrell

jaykrell Jan 27, 2018

Member

I believe Apple has a very old GNU binutils fork, forked in Next days. There is lld but I don't think they use it.

This comment has been minimized.

@eschaton

eschaton Jan 27, 2018

Apple doesn’t currently use either lld or GNU binutils for its linker. Apple’s linker is its own Open Source ld64.

@eschaton

eschaton Jan 27, 2018

Apple doesn’t currently use either lld or GNU binutils for its linker. Apple’s linker is its own Open Source ld64.

Show outdated Hide outdated mono/mini/mini-exceptions.c
@@ -2396,12 +2396,15 @@ mono_setup_altstack (MonoJitTlsData *tls)
g_assert ((guint8*)&sa >= (guint8*)tls->stack_ovf_guard_base + tls->stack_ovf_guard_size);
/* the valloc call here seems problematic on AIX */
#if !defined(_AIX)

This comment has been minimized.

@lewurm

lewurm Jan 25, 2018

Member

ifdefing this part out, makes this code broken and useless. instead we should rather not set MONO_ARCH_SIGSEGV_ON_ALTSTACK in mini-ppc.h.

@lewurm

lewurm Jan 25, 2018

Member

ifdefing this part out, makes this code broken and useless. instead we should rather not set MONO_ARCH_SIGSEGV_ON_ALTSTACK in mini-ppc.h.

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Jan 25, 2018

Member

cool, thanks for your contribution! 🙂

a couple things:

  • I recommend to --disable-boehm, and concentrate to get sgen working as it is our default GC.
  • we sort of care about ppc64le on Linux, so we shouldn't break it further (and in general, we shouldn't break any other platform 😉 )
  • what's PASE?
  • what's the difference between aix and os400?
  • do you have a link handy describing the ABI on AIX?
Member

lewurm commented Jan 25, 2018

cool, thanks for your contribution! 🙂

a couple things:

  • I recommend to --disable-boehm, and concentrate to get sgen working as it is our default GC.
  • we sort of care about ppc64le on Linux, so we shouldn't break it further (and in general, we shouldn't break any other platform 😉 )
  • what's PASE?
  • what's the difference between aix and os400?
  • do you have a link handy describing the ABI on AIX?
@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Jan 25, 2018

Member

build

Member

lewurm commented Jan 25, 2018

build

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Jan 25, 2018

Member

@monojenkins build Linux PPC64 little endian

Member

lewurm commented Jan 25, 2018

@monojenkins build Linux PPC64 little endian

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Jan 25, 2018

Contributor
  • I'll consider disabling Boehm. It's horrific in there anyways, last time I was debugging it. SGen is what I'm testing with, however.

  • This should be doable with #ifdefs, probably. After all, Mono still supports (supported?) big endian PPC.

  • PASE is basically like Windows Subsystem for Linux, but for IBM i; a minicomputer operating system still in active sale, development, and support. (Basically, instead of NT emulating Linux syscalls, imagine i emulating AIX syscalls; all with their respective userlands.)

  • Autotools identifies PASE as OS400, the uname system name value for PASE. This does affect build parameters, as PASE is subtly different when building. (Autotools thinks powerpc-ibm-os400 doesn't support shared libraries at all, for example, when it does, and PASE lacks /dev/random.)

  • The IBM assembler manual, but I didn't find it describe much related to what's needed, and it's somewhat cryptic at times; at least for me, who's never worked with any assembler, let alone POWER assembler before. It's definitely not the SVR4 conventions 32-bit Linux uses though. (For example, from reading v8 JIT code, I'm pretty sure 32-bit AIX uses function descriptors, and it uses r2, the TOC register more, but I could be misreading...)

Contributor

NattyNarwhal commented Jan 25, 2018

  • I'll consider disabling Boehm. It's horrific in there anyways, last time I was debugging it. SGen is what I'm testing with, however.

  • This should be doable with #ifdefs, probably. After all, Mono still supports (supported?) big endian PPC.

  • PASE is basically like Windows Subsystem for Linux, but for IBM i; a minicomputer operating system still in active sale, development, and support. (Basically, instead of NT emulating Linux syscalls, imagine i emulating AIX syscalls; all with their respective userlands.)

  • Autotools identifies PASE as OS400, the uname system name value for PASE. This does affect build parameters, as PASE is subtly different when building. (Autotools thinks powerpc-ibm-os400 doesn't support shared libraries at all, for example, when it does, and PASE lacks /dev/random.)

  • The IBM assembler manual, but I didn't find it describe much related to what's needed, and it's somewhat cryptic at times; at least for me, who's never worked with any assembler, let alone POWER assembler before. It's definitely not the SVR4 conventions 32-bit Linux uses though. (For example, from reading v8 JIT code, I'm pretty sure 32-bit AIX uses function descriptors, and it uses r2, the TOC register more, but I could be misreading...)

NattyNarwhal added some commits Jan 25, 2018

Disable Boehm GC on AIX
Focus on getting SGen working, and avoid legacy debugging nonsense
Don't use sigaltstack on AIX due to bugginess with guard sections
The valloc call on AIX has issues after issuing mprotect; don't do
do it. I believe it fails because we aren't issuing the right
flags on AIX, or because we're allocating inside of an already
allocated area.
@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Jan 25, 2018

Contributor

Suggested actionable changes done.

Contributor

NattyNarwhal commented Jan 25, 2018

Suggested actionable changes done.

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Jan 26, 2018

Member

build

Member

lewurm commented Jan 26, 2018

build

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Jan 26, 2018

Member

@monojenkins build Linux PPC64 little endian

Member

lewurm commented Jan 26, 2018

@monojenkins build Linux PPC64 little endian

@edelsohn

This comment has been minimized.

Show comment
Hide comment
@edelsohn

edelsohn Feb 1, 2018

GCC TLS support is relatively recent, but nothing like this error has been reported. I really would need to see the context of the .tc statement.

It may be, again, that ELF files allows some ordering of pseudo-ops produced by __thread declarations that causes heartburn on AIX XCOFF. I even can imagine that the -fno-toplevel-reorder option may have an effect.

edelsohn commented Feb 1, 2018

GCC TLS support is relatively recent, but nothing like this error has been reported. I really would need to see the context of the .tc statement.

It may be, again, that ELF files allows some ordering of pseudo-ops produced by __thread declarations that causes heartburn on AIX XCOFF. I even can imagine that the -fno-toplevel-reorder option may have an effect.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 1, 2018

Contributor

Yeah, compiling with pthread TLS seems to get past the error. I'll have to consider trying that flag with gcc when using __thread.

Here's the assembler output for the file: http://ix.io/F3p

Contributor

NattyNarwhal commented Feb 1, 2018

Yeah, compiling with pthread TLS seems to get past the error. I'll have to consider trying that flag with gcc when using __thread.

Here's the assembler output for the file: http://ix.io/F3p

@edelsohn

This comment has been minimized.

Show comment
Hide comment
@edelsohn

edelsohn Feb 1, 2018

The linked assembler file cannot be equivalent to the assembler file that caused the error. Was it produced with the exact same command line options and -S instead of -c? The error message is

/tmp//cccA97Dc.s: line 4010: 1252-018 Use a .tc inside a .toc scope only.

and there is no ".tc" pseudo-op at line 4010.

The error also may be related to the use of -mminimal-toc, which I sort of remember seeing in one set of options. One no longer should use -mminimal-toc. -mcmodel=large is the better approach now.

edelsohn commented Feb 1, 2018

The linked assembler file cannot be equivalent to the assembler file that caused the error. Was it produced with the exact same command line options and -S instead of -c? The error message is

/tmp//cccA97Dc.s: line 4010: 1252-018 Use a .tc inside a .toc scope only.

and there is no ".tc" pseudo-op at line 4010.

The error also may be related to the use of -mminimal-toc, which I sort of remember seeing in one set of options. One no longer should use -mminimal-toc. -mcmodel=large is the better approach now.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 1, 2018

Contributor

I had reran autogen and did a clean rebuild before making that assembler file, so the error is on line 3994.

/tmp//ccMbcykn.s: line 3994: 1252-018 Use a .tc inside a .toc scope only. Precede the .tc statements with a .toc
                statement.
Contributor

NattyNarwhal commented Feb 1, 2018

I had reran autogen and did a clean rebuild before making that assembler file, so the error is on line 3994.

/tmp//ccMbcykn.s: line 3994: 1252-018 Use a .tc inside a .toc scope only. Precede the .tc statements with a .toc
                statement.
@edelsohn

This comment has been minimized.

Show comment
Hide comment
@edelsohn

edelsohn Feb 1, 2018

Try removing -mminimal-toc. If Mono really is overflowing the TOC, use -mcmodel=large.

edelsohn commented Feb 1, 2018

Try removing -mminimal-toc. If Mono really is overflowing the TOC, use -mcmodel=large.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 1, 2018

Contributor

Doing another run: replacing minimal-toc with mcmodel=large in configure.ac seems to work for compiling so far.

Contributor

NattyNarwhal commented Feb 1, 2018

Doing another run: replacing minimal-toc with mcmodel=large in configure.ac seems to work for compiling so far.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 1, 2018

Contributor

I had left my session away, and came back to find:

  CCLD     libmonosgen-2.0.la
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-object.o], section 1
        The relocation type of the RLD for address 0x3d22 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-object.o], section 1
        The relocation type of the RLD for address 0x8c6a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-image.o], section 1
        The relocation type of the RLD for address 0x24ba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-image.o], section 1
        The relocation type of the RLD for address 0x24c6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x3b62 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x3b6a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x92ca is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x12222 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x124ca is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x14aba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x14b2a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x22d6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x22de is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fb2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fd6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fde is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-metadata-verify.o], section 1
        The relocation type of the RLD for address 0xd8c2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-metadata-verify.o], section 1
        The relocation type of the RLD for address 0xd9aa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x672a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_thread_force_interruption_checkpoint_noraise
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x94de is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x94ee is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x955a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x9a22 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x9a26 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x9faa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xa04a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xa056 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xa9b6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xaa3e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xab46 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xb47a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_thread_force_interruption_checkpoint_noraise
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xb7d2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xbc5e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xc68a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xc75e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xd2a6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xe3a2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x11dfa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1b55e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_enter_gc_safe_region_unbalanced
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1b61a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_exit_gc_safe_region_unbalanced
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1b93a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1cb96 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1d95e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_gchandle_get_target
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1dc66 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_gchandle_new
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1df7a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_attach_coop
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1e00a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_detach_coop
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1e226 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1f7c6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x4972 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x6072 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x691a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x8fae is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-sre.o], section 1
        The relocation type of the RLD for address 0x27ea is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is reflected_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-sre.o], section 1
        The relocation type of the RLD for address 0x27f6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is reflected_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x5dfe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is strcmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x604e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_ascii_strcasecmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1196e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is strcmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x11c4e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_ascii_strcasecmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x190be is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is strcmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x19186 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_ascii_strcasecmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1acaa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1acb2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1acba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x1d7e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3e96 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3e9a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3f52 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3f56 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x45f6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x45fa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-ppc.o], section 1
        The relocation type of the RLD for address 0x7b56 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_ppc_throw_exception
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x55b2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_class_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x572a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_method_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x9a46 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_class_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x9a8a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_method_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x229da is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is ves_icall_object_new
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x23ba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x248e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x3c1a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x3c1e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x44fa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x44fe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xacea is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xacee is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xad3e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xad42 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xed1a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xed22 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x6ed2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x16356 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x1635a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x1692e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x16936 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x1b2fe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x8fba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_patch_info_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x8fbe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_patch_info_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x138e6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x138ea is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x199da is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x199de is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-dwarfwriter.o], section 1
        The relocation type of the RLD for address 0x2436 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-dwarfwriter.o], section 1
        The relocation type of the RLD for address 0x243e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
collect2: error: ld returned 12 exit status
gmake[4]: *** [Makefile:1534: libmonosgen-2.0.la] Error 1

Looks like IBM ld can't handle mcmodel=large....?

Contributor

NattyNarwhal commented Feb 1, 2018

I had left my session away, and came back to find:

  CCLD     libmonosgen-2.0.la
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-object.o], section 1
        The relocation type of the RLD for address 0x3d22 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-object.o], section 1
        The relocation type of the RLD for address 0x8c6a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-image.o], section 1
        The relocation type of the RLD for address 0x24ba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-image.o], section 1
        The relocation type of the RLD for address 0x24c6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x3b62 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x3b6a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x92ca is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x12222 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x124ca is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x14aba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-class.o], section 1
        The relocation type of the RLD for address 0x14b2a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x22d6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x22de is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fb2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fd6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-loader.o], section 1
        The relocation type of the RLD for address 0x2fde is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-metadata-verify.o], section 1
        The relocation type of the RLD for address 0xd8c2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-metadata-verify.o], section 1
        The relocation type of the RLD for address 0xd9aa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x672a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_thread_force_interruption_checkpoint_noraise
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x94de is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x94ee is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x955a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x9a22 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x9a26 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x9faa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xa04a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xa056 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xa9b6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xaa3e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xab46 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xb47a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_thread_force_interruption_checkpoint_noraise
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xb7d2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xbc5e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xc68a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xc75e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xd2a6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0xe3a2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x11dfa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1b55e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_enter_gc_safe_region_unbalanced
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1b61a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_exit_gc_safe_region_unbalanced
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1b93a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1cb96 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1d95e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_gchandle_get_target
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1dc66 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_gchandle_new
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1df7a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_attach_coop
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1e00a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_threads_detach_coop
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1e226 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-marshal.o], section 1
        The relocation type of the RLD for address 0x1f7c6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x4972 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x6072 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x691a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-cominterop.o], section 1
        The relocation type of the RLD for address 0x8fae is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-sre.o], section 1
        The relocation type of the RLD for address 0x27ea is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is reflected_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-sre.o], section 1
        The relocation type of the RLD for address 0x27f6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is reflected_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x5dfe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is strcmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x604e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_ascii_strcasecmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1196e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is strcmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x11c4e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_ascii_strcasecmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x190be is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is strcmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x19186 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_ascii_strcasecmp
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1acaa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1acb2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-icall.o], section 1
        The relocation type of the RLD for address 0x1acba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x1d7e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3e96 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3e9a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3f52 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x3f56 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x45f6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_free
ld: 0711-784 SEVERE ERROR: Object ../../mono/metadata/.libs/libmonoruntimesgen.a[libmonoruntimesgen_la-remoting.o], section 1
        The relocation type of the RLD for address 0x45fa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-ppc.o], section 1
        The relocation type of the RLD for address 0x7b56 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_ppc_throw_exception
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x55b2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_class_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x572a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_method_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x9a46 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_class_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x9a8a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_fill_method_rgctx
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-method-to-ir.o], section 1
        The relocation type of the RLD for address 0x229da is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is ves_icall_object_new
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x23ba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x248e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x3c1a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x3c1e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x44fa is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_metadata_signature_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-mini-generic-sharing.o], section 1
        The relocation type of the RLD for address 0x44fe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_signature_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xacea is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xacee is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xad3e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xad42 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xed1a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-runtime.o], section 1
        The relocation type of the RLD for address 0xed22 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x6ed2 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x16356 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x1635a is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x1692e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x16936 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-debugger-agent.o], section 1
        The relocation type of the RLD for address 0x1b2fe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_aligned_addr_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x8fba is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_patch_info_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x8fbe is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is mono_patch_info_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x138e6 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x138ea is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x199da is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-aot-compiler.o], section 1
        The relocation type of the RLD for address 0x199de is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-dwarfwriter.o], section 1
        The relocation type of the RLD for address 0x2436 is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_equal
ld: 0711-784 SEVERE ERROR: Object ./.libs/libmini.a[libmini_la-dwarfwriter.o], section 1
        The relocation type of the RLD for address 0x243e is R_TOCL,
        but the instruction does not address the first byte of the
        referenced symbol.
        The referenced symbol is monoeg_g_str_hash
collect2: error: ld returned 12 exit status
gmake[4]: *** [Makefile:1534: libmonosgen-2.0.la] Error 1

Looks like IBM ld can't handle mcmodel=large....?

@edelsohn

This comment has been minimized.

Show comment
Hide comment
@edelsohn

edelsohn Feb 1, 2018

This isn't directly mcmodel=large. Are you certain that you started from a clean build?

Mono is doing some weird things. I'm not certain how it's trying to convince GCC to reference the middle of a symbol. Based on the names of the symbols eliciting the error and the error itself, I suspect that Mono is doing some "creative" and maybe not so safe things with pointers.

Also try adding -fno-section-anchors.

edelsohn commented Feb 1, 2018

This isn't directly mcmodel=large. Are you certain that you started from a clean build?

Mono is doing some weird things. I'm not certain how it's trying to convince GCC to reference the middle of a symbol. Based on the names of the symbols eliciting the error and the error itself, I suspect that Mono is doing some "creative" and maybe not so safe things with pointers.

Also try adding -fno-section-anchors.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 1, 2018

Contributor

Nope, substituting minimal-toc for -mcmodel=large -fno-toplevel-reorder -fno-section-anchors didn't change; we still get that error.

I may just switch to pthread TLS, as that was working last time.

Contributor

NattyNarwhal commented Feb 1, 2018

Nope, substituting minimal-toc for -mcmodel=large -fno-toplevel-reorder -fno-section-anchors didn't change; we still get that error.

I may just switch to pthread TLS, as that was working last time.

Don't use __thread even if detected on AIX
tl;dr: The assembler gets angry with __thread and minimal-toc, and
changing options to replace minimal-toc causes linker issues; this
TLS option isn't important anyways if we have pthread instead,
like before when we were using Perzl's old GCC without __thread.
@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 1, 2018

Contributor

So, now we deal with (what I'm pretty sure is) gacutil trying to use a Linux name for libc on make install:

gmake[6]: Entering directory '/opt/monodev/mono/mcs/class/Mono.Security'
gmake install-local
gmake[7]: Entering directory '/opt/monodev/mono/mcs/class/Mono.Security'
MONO_PATH="./../../class/lib/build:$MONO_PATH" /opt/monodev/mono/runtime/mono-wrapper  ./../../class/lib/build/gacutil.exe /i ./../../class/lib/net_4_x-linux/Mono.Security.dll /f  /root /opt/mono/lib /package 4.5
mono_thread_internal_set_priority: pthread_setschedparam failed, error: "Operation not permitted." (1)

Unhandled Exception:
System.DllNotFoundException: libc.so.6
  at (wrapper managed-to-native) Mono.Tools.Driver.symlink(string,string)
  at Mono.Tools.Driver.Install (System.Boolean check_refs, System.String name, System.String package, System.String gacdir, System.String link_gacdir, System.String libdir, System.String link_libdir) [0x0044d] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
  at Mono.Tools.Driver.Main (System.String[] args) [0x00394] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libc.so.6
  at (wrapper managed-to-native) Mono.Tools.Driver.symlink(string,string)
  at Mono.Tools.Driver.Install (System.Boolean check_refs, System.String name, System.String package, System.String gacdir, System.String link_gacdir, System.String libdir, System.String link_libdir) [0x0044d] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
  at Mono.Tools.Driver.Main (System.String[] args) [0x00394] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
gmake[7]: *** [../../build/library.make:204: install-local] Error 1
gmake[7]: Leaving directory '/opt/monodev/mono/mcs/class/Mono.Security'
gmake[6]: *** [../../build/rules.make:211: do-install] Error 2
gmake[6]: Leaving directory '/opt/monodev/mono/mcs/class/Mono.Security'
gmake[5]: *** [../build/rules.make:232: install-recursive] Error 1
gmake[5]: Leaving directory '/opt/monodev/mono/mcs/class'
gmake[4]: *** [build/rules.make:232: install-recursive] Error 1
gmake[4]: Leaving directory '/opt/monodev/mono/mcs'
gmake[3]: *** [Makefile:54: profile-do--net_4_x--install] Error 2
gmake[3]: Leaving directory '/opt/monodev/mono/mcs'
gmake[2]: *** [Makefile:50: profiles-do--install] Error 2
gmake[2]: Leaving directory '/opt/monodev/mono/mcs'
gmake[1]: *** [Makefile:620: install-exec] Error 2
gmake[1]: Leaving directory '/opt/monodev/mono/runtime'
gmake: *** [Makefile:558: install-recursive] Error 1
Contributor

NattyNarwhal commented Feb 1, 2018

So, now we deal with (what I'm pretty sure is) gacutil trying to use a Linux name for libc on make install:

gmake[6]: Entering directory '/opt/monodev/mono/mcs/class/Mono.Security'
gmake install-local
gmake[7]: Entering directory '/opt/monodev/mono/mcs/class/Mono.Security'
MONO_PATH="./../../class/lib/build:$MONO_PATH" /opt/monodev/mono/runtime/mono-wrapper  ./../../class/lib/build/gacutil.exe /i ./../../class/lib/net_4_x-linux/Mono.Security.dll /f  /root /opt/mono/lib /package 4.5
mono_thread_internal_set_priority: pthread_setschedparam failed, error: "Operation not permitted." (1)

Unhandled Exception:
System.DllNotFoundException: libc.so.6
  at (wrapper managed-to-native) Mono.Tools.Driver.symlink(string,string)
  at Mono.Tools.Driver.Install (System.Boolean check_refs, System.String name, System.String package, System.String gacdir, System.String link_gacdir, System.String libdir, System.String link_libdir) [0x0044d] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
  at Mono.Tools.Driver.Main (System.String[] args) [0x00394] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: libc.so.6
  at (wrapper managed-to-native) Mono.Tools.Driver.symlink(string,string)
  at Mono.Tools.Driver.Install (System.Boolean check_refs, System.String name, System.String package, System.String gacdir, System.String link_gacdir, System.String libdir, System.String link_libdir) [0x0044d] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
  at Mono.Tools.Driver.Main (System.String[] args) [0x00394] in <b9fdaaf84b0749df8259fff5d7c8f048>:0
gmake[7]: *** [../../build/library.make:204: install-local] Error 1
gmake[7]: Leaving directory '/opt/monodev/mono/mcs/class/Mono.Security'
gmake[6]: *** [../../build/rules.make:211: do-install] Error 2
gmake[6]: Leaving directory '/opt/monodev/mono/mcs/class/Mono.Security'
gmake[5]: *** [../build/rules.make:232: install-recursive] Error 1
gmake[5]: Leaving directory '/opt/monodev/mono/mcs/class'
gmake[4]: *** [build/rules.make:232: install-recursive] Error 1
gmake[4]: Leaving directory '/opt/monodev/mono/mcs'
gmake[3]: *** [Makefile:54: profile-do--net_4_x--install] Error 2
gmake[3]: Leaving directory '/opt/monodev/mono/mcs'
gmake[2]: *** [Makefile:50: profiles-do--install] Error 2
gmake[2]: Leaving directory '/opt/monodev/mono/mcs'
gmake[1]: *** [Makefile:620: install-exec] Error 2
gmake[1]: Leaving directory '/opt/monodev/mono/runtime'
gmake: *** [Makefile:558: install-recursive] Error 1
Get lib.a(lib.o) type archives working with P/Invoke for AIX
AIX libraries are very, very strange compared to other Unices.

I'm not entirely sure if this is correct or optimal; it may need
to special case further. For now, it's enough to get gacutil
up and running.

Some resources I found useful for this charade:
<http://stromberg.dnsalias.org/~dstromberg/AIX-shared-libs.html>

Also set libc and libintl to their proper values.
@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 2, 2018

Contributor

I'd say this PR is ready to merge. To recap: dynamic linking works, we can call into AIX's weird library style with dlopen, which gets gacutil working, which in turn, makes it possible to make install.

Contributor

NattyNarwhal commented Feb 2, 2018

I'd say this PR is ready to merge. To recap: dynamic linking works, we can call into AIX's weird library style with dlopen, which gets gacutil working, which in turn, makes it possible to make install.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 2, 2018

Contributor

That being said, I still have some minor things to investigate, but those can be put aside and effort spent on getting this merged.

Contributor

NattyNarwhal commented Feb 2, 2018

That being said, I still have some minor things to investigate, but those can be put aside and effort spent on getting this merged.

Scheduling priority hack for i
PASE doesn't accept anything other than SCHED_OTHER, and the funcs
for getting min/max don't work either. AIX suffers, but only a
little bit.
@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 2, 2018

Contributor

Still mergeable, just leaving this up for future reference to debug a DNS issue in Mono:

$ cat testdns.cs
using System;
using System.Net;

class ResolveDNS {
        public static void Main(string[] args) {
                Console.WriteLine(Dns.GetHostByName(args[0]));
        }
}
$ /opt/mono/bin/mono --trace=T:System.Net.Dns testdns.exe github.com
mono_thread_internal_set_priority: pthread_setschedparam failed, error: "Operation not permitted." (1)
[1: 0.00000 0] ENTER: System.Net.Dns:.cctor ()() ip: 7000000000848f4
[1: 0.00202 0] LEAVE: System.Net.Dns:.cctor ()
[1: 0.00207 0] ENTER: System.Net.Dns:GetHostByName (string)() ip: 700000000084088
[1:] EXCEPTION handling: System.EntryPointNotFoundException: getifaddrs
[1:] EXCEPTION handling: System.EntryPointNotFoundException: getifaddrs
[1: 0.04000 1] ENTER: (wrapper managed-to-native) System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&,int)() ip: 700000000084450
[1: 0.05283 1] LEAVE: (wrapper managed-to-native) System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&,int)result=1
[1: 0.05404 1] ENTER: System.Net.Dns:hostent_to_IPHostEntry (string,string,string[],string[])() ip: 7000000000844c0
[1: 0.05879 2] ENTER: System.Net.Dns:Error_11001 (string)() ip: 7000000003d4a50
[1:] EXCEPTION handling: System.Net.Sockets.SocketException: Could not resolve host 'github.com'

Unhandled Exception:
System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'github.com'
  at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.hostent_to_IPHostEntry (System.String originalHostName, System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00082] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.GetHostByName (System.String hostName) [0x0002f] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at ResolveDNS.Main (System.String[] args) [0x00013] in <a0fb5c27bef04bc09d46e68d134f0f47>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'github.com'
  at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.hostent_to_IPHostEntry (System.String originalHostName, System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00082] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.GetHostByName (System.String hostName) [0x0002f] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at ResolveDNS.Main (System.String[] args) [0x00013] in <a0fb5c27bef04bc09d46e68d134f0f47>:0

(updated test case)

Contributor

NattyNarwhal commented Feb 2, 2018

Still mergeable, just leaving this up for future reference to debug a DNS issue in Mono:

$ cat testdns.cs
using System;
using System.Net;

class ResolveDNS {
        public static void Main(string[] args) {
                Console.WriteLine(Dns.GetHostByName(args[0]));
        }
}
$ /opt/mono/bin/mono --trace=T:System.Net.Dns testdns.exe github.com
mono_thread_internal_set_priority: pthread_setschedparam failed, error: "Operation not permitted." (1)
[1: 0.00000 0] ENTER: System.Net.Dns:.cctor ()() ip: 7000000000848f4
[1: 0.00202 0] LEAVE: System.Net.Dns:.cctor ()
[1: 0.00207 0] ENTER: System.Net.Dns:GetHostByName (string)() ip: 700000000084088
[1:] EXCEPTION handling: System.EntryPointNotFoundException: getifaddrs
[1:] EXCEPTION handling: System.EntryPointNotFoundException: getifaddrs
[1: 0.04000 1] ENTER: (wrapper managed-to-native) System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&,int)() ip: 700000000084450
[1: 0.05283 1] LEAVE: (wrapper managed-to-native) System.Net.Dns:GetHostByName_internal (string,string&,string[]&,string[]&,int)result=1
[1: 0.05404 1] ENTER: System.Net.Dns:hostent_to_IPHostEntry (string,string,string[],string[])() ip: 7000000000844c0
[1: 0.05879 2] ENTER: System.Net.Dns:Error_11001 (string)() ip: 7000000003d4a50
[1:] EXCEPTION handling: System.Net.Sockets.SocketException: Could not resolve host 'github.com'

Unhandled Exception:
System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'github.com'
  at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.hostent_to_IPHostEntry (System.String originalHostName, System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00082] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.GetHostByName (System.String hostName) [0x0002f] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at ResolveDNS.Main (System.String[] args) [0x00013] in <a0fb5c27bef04bc09d46e68d134f0f47>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.Net.Sockets.SocketException (0x80004005): Could not resolve host 'github.com'
  at System.Net.Dns.Error_11001 (System.String hostName) [0x00015] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.hostent_to_IPHostEntry (System.String originalHostName, System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00082] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at System.Net.Dns.GetHostByName (System.String hostName) [0x0002f] in <d46682f7e6dd42a89e5b7c900df1adad>:0
  at ResolveDNS.Main (System.String[] args) [0x00013] in <a0fb5c27bef04bc09d46e68d134f0f47>:0

(updated test case)

@edelsohn

This comment has been minimized.

Show comment
Hide comment
@edelsohn

edelsohn Feb 2, 2018

Congratulations! Glad that Mono now is working on AIX. That's a big accomplishment!

-Wl,-b64 should not be necessary in CPPFLAGS and LDFLAGS because GCC -maix64 implies that already when it invokes the linker.

export OBJECT_MODE=64 should not be necessary with -X64. And hidden, magic, global variables are bad.

libintl.a(libintl.so.9) probably will come back to bit you because different library versionings are floaing around. libintl.so.1, which is 1.0, and libintl.so.9, which is 0.9 and libintl.so.8, which is 0.8.

-Wl,-bexpall should be useless because the explicit export list created by libtool overrides it.

edelsohn commented Feb 2, 2018

Congratulations! Glad that Mono now is working on AIX. That's a big accomplishment!

-Wl,-b64 should not be necessary in CPPFLAGS and LDFLAGS because GCC -maix64 implies that already when it invokes the linker.

export OBJECT_MODE=64 should not be necessary with -X64. And hidden, magic, global variables are bad.

libintl.a(libintl.so.9) probably will come back to bit you because different library versionings are floaing around. libintl.so.1, which is 1.0, and libintl.so.9, which is 0.9 and libintl.so.8, which is 0.8.

-Wl,-bexpall should be useless because the explicit export list created by libtool overrides it.

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 2, 2018

Contributor

Next time I try fiddling with configure.ac (maybe see if I can get sigaltstack working, for instance) I'll consider cleaning up the defines there a little.

DNS investigation: could be mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs hardcoding an assumption on getifaddrs (which doesn't exist on AIX) or some bug in the icall part of GetHostByName_internal.

Contributor

NattyNarwhal commented Feb 2, 2018

Next time I try fiddling with configure.ac (maybe see if I can get sigaltstack working, for instance) I'll consider cleaning up the defines there a little.

DNS investigation: could be mcs/class/System/System.Net.NetworkInformation/NetworkInterface.cs hardcoding an assumption on getifaddrs (which doesn't exist on AIX) or some bug in the icall part of GetHostByName_internal.

Show outdated Hide outdated configure.ac
LDFLAGS="${LDFLAGS} -Wl,-bexpall"
;;
*)
;;

This comment has been minimized.

@lewurm

lewurm Feb 2, 2018

Member

I think we should set the same in the default case as in the GNU ld case

@lewurm

lewurm Feb 2, 2018

Member

I think we should set the same in the default case as in the GNU ld case

Show outdated Hide outdated libgc/configure.ac
*-*-os400*)
AC_DEFINE(GC_AIX_THREADS)
AC_DEFINE(_REENTRANT)
;;
*-*-haiku*)

This comment has been minimized.

@lewurm

lewurm Feb 2, 2018

Member

undo this change in libgc, we'll likely have a submodule for boehm GC soon, so this would be lost anyway (/cc @joncham )

@lewurm

lewurm Feb 2, 2018

Member

undo this change in libgc, we'll likely have a submodule for boehm GC soon, so this would be lost anyway (/cc @joncham )

Show outdated Hide outdated libgc/pthread_stop_world.c
@@ -2,7 +2,7 @@
#if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
&& !defined(GC_IRIX_THREADS) && !defined(GC_WIN32_THREADS) \
&& !defined(GC_DARWIN_THREADS) && !defined(GC_AIX_THREADS)
&& !defined(GC_DARWIN_THREADS)

This comment has been minimized.

@lewurm

lewurm Feb 2, 2018

Member

undo this change in libgc, we'll likely have a submodule for boehm GC soon, so this would be lost anyway (/cc @joncham )

@lewurm

lewurm Feb 2, 2018

Member

undo this change in libgc, we'll likely have a submodule for boehm GC soon, so this would be lost anyway (/cc @joncham )

Show outdated Hide outdated mono/metadata/boehm-gc.c
* ship a "fixed" header file without "non-standard" declarations like it, so don't
* use it, even if it's there
*/
#if defined(HAVE_PTHREAD_GETATTR_NP) && defined(HAVE_PTHREAD_ATTR_GETSTACK) && !defined(_AIX)

This comment has been minimized.

@lewurm

lewurm Feb 2, 2018

Member

since you don't use boehm, please undo this change

@lewurm

lewurm Feb 2, 2018

Member

since you don't use boehm, please undo this change

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 2, 2018

Member

pretty good job, congrats 🙂

looks good overall! do you think you can add a header that collects all those AIX specific extern hacks in support/ and mono/eglib? So it would be nicely in one file and not spread in the codebase.

Member

lewurm commented Feb 2, 2018

pretty good job, congrats 🙂

looks good overall! do you think you can add a header that collects all those AIX specific extern hacks in support/ and mono/eglib? So it would be nicely in one file and not spread in the codebase.

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 2, 2018

Member

build

Member

lewurm commented Feb 2, 2018

build

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 2, 2018

Member

@monojenkins build Linux PPC64 little endian

Member

lewurm commented Feb 2, 2018

@monojenkins build Linux PPC64 little endian

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 2, 2018

Contributor

I think a lot of the AIX extern hacks can be removed because newer GCC packaged by Bull has better includes; as David said early in the thread, GCC 4.x on AIX was a "bad vintage."

Working on a commit to do this cleanup suggested by you two.

Contributor

NattyNarwhal commented Feb 2, 2018

I think a lot of the AIX extern hacks can be removed because newer GCC packaged by Bull has better includes; as David said early in the thread, GCC 4.x on AIX was a "bad vintage."

Working on a commit to do this cleanup suggested by you two.

Final polish on request
Remove Boehm changes if we don't use Boehm, tweak some defines,
remove some externs, tweak autoconf file
@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 2, 2018

Contributor

Suggestions from @lewurm done.

Contributor

NattyNarwhal commented Feb 2, 2018

Suggestions from @lewurm done.

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 2, 2018

Member

build

Member

lewurm commented Feb 2, 2018

build

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 2, 2018

Member

@monojenkins build Linux PPC64 little endian

Member

lewurm commented Feb 2, 2018

@monojenkins build Linux PPC64 little endian

@NattyNarwhal

This comment has been minimized.

Show comment
Hide comment
@NattyNarwhal

NattyNarwhal Feb 3, 2018

Contributor

LMK about merging this patch. I have a feeling I'll need to work on the BCL to fix a sockets issue, the same one I mentioned that prevents DNS from working; but it'd be perhaps prudent to branch again in master; and discuss the problem and what'd need to be changed in a new issue/PR.

Contributor

NattyNarwhal commented Feb 3, 2018

LMK about merging this patch. I have a feeling I'll need to work on the BCL to fix a sockets issue, the same one I mentioned that prevents DNS from working; but it'd be perhaps prudent to branch again in master; and discuss the problem and what'd need to be changed in a new issue/PR.

Be aware of ERESTART, on OSes that use it
Instead of EINTR/EAGAIN, AIX uses ERESTART. Handle this, so things
like xsp are less chatty when performing async IO.
@lewurm

lewurm approved these changes Feb 5, 2018

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 5, 2018

Member

build

Member

lewurm commented Feb 5, 2018

build

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm

lewurm Feb 5, 2018

Member

@monojenkins build Linux PPC64 little endian

Member

lewurm commented Feb 5, 2018

@monojenkins build Linux PPC64 little endian

@lewurm

This comment has been minimized.

Show comment
Hide comment
@lewurm
Member

lewurm commented Feb 5, 2018

@monojenkins squash

@lewurm lewurm merged commit d568c0b into mono:master Feb 5, 2018

15 of 22 checks passed

Linux ARMv5 Build finished. 90146 tests run, 1438 skipped, 3 failed.
Details
Linux ARMv7 Build finished. 90146 tests run, 1438 skipped, 3 failed.
Details
Linux ARMv7 Interpreter Build finished. 11156 tests run, 97 skipped, 0 failed.
Details
Linux PPC64 little endian Build finished. No test results found.
Details
Linux i386 Coop GC Build finished. 89929 tests run, 1432 skipped, 2 failed.
Details
Windows i386 Build finished. 85343 tests run, 1148 skipped, 0 failed.
Details
Windows x64 Build finished. 85365 tests run, 1150 skipped, 0 failed.
Details
API Diff No public API changes found.
Details
Linux AArch64 Build finished. 90183 tests run, 1443 skipped, 0 failed.
Details
Linux AArch64 Interpreter Build finished. 11173 tests run, 97 skipped, 0 failed.
Details
Linux i386 Build finished. 90187 tests run, 1435 skipped, 0 failed.
Details
Linux x64 Build finished. 90187 tests run, 1437 skipped, 0 failed.
Details
Linux x64 Acceptance Tests Build finished. 6682 tests run, 6 skipped, 0 failed.
Details
Linux x64 Coop GC Build finished. 90174 tests run, 1437 skipped, 0 failed.
Details
Linux x64 FullAOT Build finished. 21721 tests run, 552 skipped, 0 failed.
Details
Linux x64 Interpreter Build finished. 11176 tests run, 97 skipped, 0 failed.
Details
Linux x64 mcs Build finished.
Details
OS X i386 Build finished. 89349 tests run, 1319 skipped, 0 failed.
Details
OS X x64 Build finished. 89349 tests run, 1321 skipped, 0 failed.
Details
PR Trigger Docs Click to view available PR triggers (Xamarin internal).
Details
Test Result Viewer Click to view aggregated test results (Xamarin internal).
Details
license/cla All CLA requirements met.
Details

joncham added a commit to Unity-Technologies/mono that referenced this pull request Apr 6, 2018

Support IBM AIX on POWER (#6677)
* Get autotools scripts for Mono and Boehm to recognize i

PASE is most similar to AIX, and perhaps I assume other commercial
Unices, as well as PowerPC Linux, so grab variables from them as
needed.

With this, we get glib failing to build due to missing mkdtemp.

* Use better cpp definition to grab more of what we want

* Fix random and 64-bit file offset support

* Set TARGET on IBM i on POWER

* Add hack to gfile-unix.c to work around flawed AIX header

From comment:

/* HACK: the preprocessor will not give us mkdtemp no matter
   what and Mono (for good reason) does
   "-Werror-implicit-function-declaration" so we error out;
   instead declare mkdtemp here; the linker will find mkdtemp
   anwyays. libuv has had similar issues, but they just ignore
   the compiler warning instead of failing on it.

   See: github.com/libuv/libuv/pull/740 */

* Work around missing definition on AIX/PASE

* Fix conflicting definition from due too AIX headers

* Initial work to get JIT working on AIX

* uncertain about NIP; is IAR the right register? need review from
  PPC asm people

* needs calling convention work; AIX does NOT use ELF

* Fix lack of casting on sigcontext macros, fix errnos for AIX

* AIX doesn't distinguish between ENOTEMPTY and EEXIST without a
  define. Handle this case with a conditional cpp directive..

* When ctx is a void pointer, dereferencing as a struct will fail.
  Handle this case with a cast.

* Handle regular AIX as well as PASE

* Implement stack boundaries check for AIX, volume info func

* vol info should be like other Unix, just needs to bridge ifdef

* highly uncertain for the bounds checking, needs further review

* Fix typo in mono/utils/mono-threads-aix.c

* In boehm-gc.c, don't use pthread_getattr_np on AIX even if available

It's not available on IBM i, and even if available, toolchains for AIX
may "helpfully" swap out system headers with variants that remove
functions like pthread_getattr_np.

* Don't use "-export-dynamic" on non-GNU ld

IBM ld considers "-e" to be a flag for setting the entry point.
Detect non-GNU ld, and offer equivalents when possible.

The makefile in mini had to be changed as a result due to
hardcoded flags.

* Use pthread-stop-world.c on AIX

Remove an ifdef that gated this off to AIX. It seems the old AIX
specific files shouldn't be used, and that the changelog for libgc
says pthread should work fine on AIX instead; yet it was blocked.
Restore this, as it compiles and seems to let mono-boehm link fine.

* AIX workarounds for some of support dir

* fstab on AIX is there, but defines a struct more like other
  platforms' checklist struct.

* AIX, like macOS and some BSDs, doesn't define some serial types.

* psignal is another victim of GNU; even then it isn't in PASE
  headers anyways

* More support workarounds for AIX headers

* Replacement function body for syslog2 on vsyslog-less platforms

AIX lacks vsyslog; detect in autoconf and act appropriately.

* Final support hacks for AIX

* Fix problematic stack management on AIX

this gets us past ifdefs, after much handwringing

* get the right end of the stack; r1/stack pointer is on the wrong
  end and ustk is just plain broken

* AIX doesn't seem to like the semantics of the mmap call valloc
  does here; either we're allocating into an area we shouldn't be
  or we're not passing the right flags. Until then, learn to live
  without the stack guard?

* Disable Boehm GC on AIX

Focus on getting SGen working, and avoid legacy debugging nonsense

* Remove AIX ifdef-undef and replace with s/hz/uhz

* Don't use sigaltstack on AIX due to bugginess with guard sections

The valloc call on AIX has issues after issuing mprotect; don't do
do it. I believe it fails because we aren't issuing the right
flags on AIX, or because we're allocating inside of an already
allocated area.

* Perform a 64-bit build on AIX

We still crash at the same place, but probably for the best that
we switch to 64-bit. (Maybe we could make it configurable?)

* Fix func descriptor ifdef, add initial (likely wrong) defs for AIX

* AIX doesn't define __powerpc64__ or __ppc64__ when compiling as
  64-bit. Use an alternate ifdef, and shuffle around that ifdef
  anyways, as it could lead to wrong results on other platforms
  too.

* AIX likely needs special definitions, especially on 32-bit. The
  calling convention is closest to PPC64BE Linux, but not exactly.

* Fix stack size on AIX

Ruby dealt with this before: ruby/ruby@a2594be

* Set up initial PPC hwcap for AIX, fix ftnptr ifdefs, tweak AIX defs

* Fix hwcap to use better values on PPC AIX

Still needs more adjustment though

* Fix alignment issue on AIX, tweak mini-ppc values just a bit more

* On AIX, doubles are always aligned by 4 if they're in structs.
  Since we need to have them aligned by 8 on 64-bit, this is bad,
  so change the type on AIX.

* We can use this definition on AIX

Now we can bootstrap Mono!

* Shuffle MonoArray ifdef per suggestion of @vargaz

* Fix System.Decimal division on big endian systems

Before, we got non-sensical overflow on things like
`(Decimal)Int32.MaxValue / 1000`; now they get the same value,
comparing this POWER6 running AIX to my server's output running
OpenBSD/amd64.

* Fix dynamically linked build of Mono on AIX

nm wasn't seeing 64-bit symbools as it defaults to 32-bit mode,
also never try to use GNU nm

* Fix PPC64 define in mono-config

Interestingly, there was an AIX define already present, and that
definition is present in AIX's passed includes, so continue to use
it.

* Don't use __thread even if detected on AIX

tl;dr: The assembler gets angry with __thread and minimal-toc, and
changing options to replace minimal-toc causes linker issues; this
TLS option isn't important anyways if we have pthread instead,
like before when we were using Perzl's old GCC without __thread.

* Get lib.a(lib.o) type archives working with P/Invoke for AIX

AIX libraries are very, very strange compared to other Unices.

I'm not entirely sure if this is correct or optimal; it may need
to special case further. For now, it's enough to get gacutil
up and running.

Some resources I found useful for this charade:
<http://stromberg.dnsalias.org/~dstromberg/AIX-shared-libs.html>

Also set libc and libintl to their proper values.

* Scheduling priority hack for i

PASE doesn't accept anything other than SCHED_OTHER, and the funcs
for getting min/max don't work either. AIX suffers, but only a
little bit.

* Final polish on request

Remove Boehm changes if we don't use Boehm, tweak some defines,
remove some externs, tweak autoconf file

* Be aware of ERESTART, on OSes that use it

Instead of EINTR/EAGAIN, AIX uses ERESTART. Handle this, so things
like xsp are less chatty when performing async IO.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment