https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128378

            Bug ID: 128378
           Summary: ga68.map exports POSIX_fileodeault instead of
                    POSIX_fileodefault
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: algol68
          Assignee: algol68 at gcc dot gnu.org
          Reporter: stefan.zobel at gmail dot com
  Target Milestone: ---

The version script libga68/ga68.map (line 45) lists POSIX_fileodeault.

The variable in ga68-posix.c is _libga68_file_o_default, and the
symbol that ga68 emits for the POSIX prelude constant file_o_default is
POSIX_fileodefault. Because the version script names a symbol that does
not exist, POSIX_fileodefault stays local in libga68.so.


begin
    int fd = fopen ("/etc/hostname", file_o_default);
    puts (whole (fd, 0) + "'n")
end


With the default (static) libga68 the program links and prints 3.

With -shared-libga68:


fod.a68:(.text+0xf8): undefined reference to `POSIX_fileodefault'
collect2: error: ld returned 1 exit status


nm -D libga68.so | grep fileo shows POSIX_fileordonly,
POSIX_fileordwr, POSIX_fileotrunc and POSIX_fileowronly, but no
POSIX_fileodefault.

Reply via email to