[Bug go/62288] New: Disagreement between gccgo and Solaris linker.

drago.ivanov at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Aug 27 21:55:00 GMT 2014


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

            Bug ID: 62288
           Summary: Disagreement between gccgo and Solaris linker.
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: go
          Assignee: ian at airs dot com
          Reporter: drago.ivanov at gmail dot com
                CC: cmang at google dot com

Platform: Solaris 10u10
GCC 4.9.0 installed from OpenCSW repository.

Problem when trying to compile program that links a package containing only
`const` definitions.

If I have the a package with the following content:

    package appdef

    const ALL_SETTINGS_UUID = "988b2332-d33f-4ac0-a17a-e82071f037e4"
    const APP_SETTINGS_UUID = "33a44120-5fb7-4790-8dc7-6ae2a36a2e59"
    const APP_SETTINGS_STRING = "ServiceCore3 Settings"

I get the following error when compiling:
    bash-3.2# go.bin build
    # svccore3
    ld: elf error: file $WORK/svccore3/libappdef.a: elf_getarsym
    ld: fatal: file processing errors. No output written to
$WORK/svccore3/_obj/exe/a.out

But then I add one empty struct in that package:

    package appdef

    const ALL_SETTINGS_UUID = "988b2332-d33f-4ac0-a17a-e82071f037e4"
    const APP_SETTINGS_UUID = "33a44120-5fb7-4790-8dc7-6ae2a36a2e59"
    const APP_SETTINGS_STRING = "ServiceCore3 Settings"

    type Appdef struct {
    }
it compiles and links just fine.



More information about the Gcc-bugs mailing list