Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8223105

Support symbols in header files are alias for different name in share library

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • None
    • None
    • tools
    • None

      It common that in system header files, a symbol may bind to a different implementation in shared libraries depends on compilation directives.

      Following is an example on Mac OS,

      int stat(const char *, struct stat *) __DARWIN_INODE64(stat);

      where in sys/cdefs.h, the symbol is bind to a particular alias,

      #define __DARWIN_INODE64(sym) __asm("_" __STRING(sym) __DARWIN_SUF_64_BIT_INO_T)

      In this case, the symbol can be bind to _stat or _stat$INODE64 in
      libsystem_c.dylib

            henryjen Henry Jen
            henryjen Henry Jen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: