What causes for this movabsq $symbol@GOTOFF assembler error with gfortran? unsupported symbol modifier in relocation

1

(I realize that this is not a well-documented question, but as I write below I don't know which information to share; I am willing to provide more as it appears useful)

I am modifying a pre-existent collection of Fortran90 programs for data processing in fluid-dynamics (which was not written by me), not substantially but more on the structural side (e.g. using shared files instead of copies and making it independent of its location).

When compiling, I get the following error (compiling on MacOS 10.15.2 with mpifort->gfortran), which I can not relate to anything since I don't know Assembly language:

gfortran -c -mcmodel=medium -fconvert=big-endian  -ffixed-line-length-140 -fno-align-commons -fbounds-check -Wall -cpp  -O3 -I/usr/local/include/ -L/usr/local/lib/ -lfftw3 -lm -Wl,-stack_size,0x10000000,-stack_addr,0xc0000000  calc_pressure.f90
/var/folders/l7/2v2vqp1n1xlcp_6_gg2y7k0r0000gn/T//ccz3q6Vo.s:1537:2: error: unsupported symbol modifier in relocation
        movabsq $270012416+_stermc.4115@GOTOFF, %rdx
        ^

I can compile in a way that I don't get this error, but it doesn't happen changing this file: I just reference different directories (i.e. different simulations).

I cannot share the whole code, both because it would be too much and because it is not open; but I am willing to provide more details, as long as I can.

minimal reproducible example

The code below gives a similar error: Undefined symbols for architecture x86_64: "_GLOBAL_OFFSET_TABLE_"

program main
  integer i 
  double precision, dimension(10) :: myarr
  double precision :: q

  q = stuff(i)
contains
  function stuff(j) result(y)
    integer :: j
    double precision, dimension(10) :: ar
    do j=1,10
      ar(j) = 1.0d2 * j
    end do
    write(*,*) ar
  end function
end program
macos
assembly
fortran
x86-64
gas
asked on Stack Overflow Jan 16, 2020 by Gabriele • edited Jan 30, 2020 by Gabriele

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0