* kdb5.c (kdb_load_library): Make dbpath_names static, to keep Solaris native
authorKen Raeburn <raeburn@mit.edu>
Fri, 2 Dec 2005 20:45:33 +0000 (20:45 +0000)
committerKen Raeburn <raeburn@mit.edu>
Fri, 2 Dec 2005 20:45:33 +0000 (20:45 +0000)
compiler happier.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17537 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/kdb/ChangeLog
src/lib/kdb/kdb5.c

index 16e0a5c2c335dc0c0ebdd0b25f1a27d6771af568..ae159d434a7234824c75ad8dd8051e055d0cfdf9 100644 (file)
@@ -1,3 +1,8 @@
+2005-12-02  Ken Raeburn  <raeburn@mit.edu>
+
+       * kdb5.c (kdb_load_library): Make dbpath_names static, to keep
+       Solaris native compiler happier.
+
 2005-10-11  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in (SHLIB_EXPLIBS): Include support library.  Don't
index 67f03e02f7e2faa758a51f5addc1d87dfe6d0c2d..91f4f8ee38baeb6ff075e145441efbacfd347540 100644 (file)
@@ -362,7 +362,12 @@ kdb_load_library(krb5_context kcontext, char *lib_name, db_library * lib)
     int     ndx;
     void   *vftabl_addr;
     char   *err_str = NULL;
-    const char *const dbpath_names[] = {
+    /* N.B.: If this is "const" but not "static", the Solaris 10
+       native compiler has trouble building the library because of
+       absolute relocations needed in read-only section ".rodata".
+       When it's static, it goes into ".picdata", which is
+       read-write.  */
+    static const char *const dbpath_names[] = {
        KDB_MODULE_SECTION, "db_module_dir", NULL,
     };
     char **profpath = NULL;