[Bug c/101766] New: Microblaze gcc misses symver but __has_attribute(symver) returns true

giulio.benetti at benettiengineering dot com gcc-bugzilla@gcc.gnu.org
Tue Aug 3 20:03:32 GMT 2021


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

            Bug ID: 101766
           Summary: Microblaze gcc misses symver but
                    __has_attribute(symver) returns true
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: giulio.benetti at benettiengineering dot com
  Target Milestone: ---

Microblaze gcc can't use .symver attribute leading to:
error: symver is only supported on ELF platforms

This is a simple test-case(taken from libfuse3) that reproduce the problem:
'''
# if !__has_attribute (symver)
# error symver attribute not supported
# endif
#else
#error __has_attribute not defined, assume we do not have symver
#endif

__attribute__ ((symver ("fuse_new@FUSE_3.0")))
void func1(void)
{

}

int main(void) {
    return 0;
}

'''
The problem is the discrepancy I've found between __has_attribute(symver)
that return true, while in gcc/gcc/config.gcc 'elfos.h' is not listed under
Microblaze cases. Trying adding elfos.h to it leads to other linker problems
and this makes me think that Microblaze doesn't actually support
__ELF__(symver).
So I thought to build gcc using --disable-symvers explictly until a fix is
found, but that doesn't either work.

Can you please give help?

Thanks a lot!


More information about the Gcc-bugs mailing list