Print this page
7127  remove -Wno-missing-braces from Makefile.uts


 886         }
 887 #if defined(_LP64)
 888         else {
 889                 auxv32_t        auxflags_auxv32;
 890 
 891                 if (copyin(args->auxp_auxflags, &auxflags_auxv32,
 892                     sizeof (auxflags_auxv32)) != 0)
 893                         return (EFAULT);
 894 
 895                 ASSERT(auxflags_auxv32.a_type == AT_SUN_AUXFLAGS);
 896                 auxflags_auxv32.a_un.a_val |= AF_SUN_NOPLM;
 897                 if (copyout(&auxflags_auxv32, args->auxp_auxflags,
 898                     sizeof (auxflags_auxv32)) != 0)
 899                         return (EFAULT);
 900         }
 901 #endif  /* _LP64 */
 902 
 903         /* Second, copy out the brand specific aux vectors. */
 904         if (args->to_model == DATAMODEL_NATIVE) {
 905                 auxv_t brand_auxv[] = {
 906                     { AT_SUN_BRAND_AUX1, 0 },
 907                     { AT_SUN_BRAND_AUX2, 0 },
 908                     { AT_SUN_BRAND_AUX3, 0 }
 909                 };
 910 
 911                 ASSERT(brand_auxv[0].a_type ==
 912                     AT_SUN_BRAND_COMMON_LDDATA);
 913                 brand_auxv[0].a_un.a_val = sed.sed_lddata;
 914 
 915                 if (copyout(&brand_auxv, args->auxp_brand,
 916                     sizeof (brand_auxv)) != 0)
 917                         return (EFAULT);
 918         }
 919 #if defined(_LP64)
 920         else {
 921                 auxv32_t brand_auxv32[] = {
 922                     { AT_SUN_BRAND_AUX1, 0 },
 923                     { AT_SUN_BRAND_AUX2, 0 },
 924                     { AT_SUN_BRAND_AUX3, 0 }
 925                 };
 926 
 927                 ASSERT(brand_auxv32[0].a_type == AT_SUN_BRAND_COMMON_LDDATA);
 928                 brand_auxv32[0].a_un.a_val = (uint32_t)sed.sed_lddata;
 929                 if (copyout(&brand_auxv32, args->auxp_brand,
 930                     sizeof (brand_auxv32)) != 0)
 931                         return (EFAULT);
 932         }
 933 #endif  /* _LP64 */
 934 
 935         /*
 936          * Third, the /proc aux vectors set up by elfexec() point to
 937          * brand emulation library and it's linker.  Copy these to the
 938          * /proc brand specific aux vector, and update the regular
 939          * /proc aux vectors to point to the executable (and it's
 940          * linker).  This will enable debuggers to access the
 941          * executable via the usual /proc or elf notes aux vectors.
 942          *
 943          * The brand emulation library's linker will get it's aux
 944          * vectors off the stack, and then update the stack with the




 886         }
 887 #if defined(_LP64)
 888         else {
 889                 auxv32_t        auxflags_auxv32;
 890 
 891                 if (copyin(args->auxp_auxflags, &auxflags_auxv32,
 892                     sizeof (auxflags_auxv32)) != 0)
 893                         return (EFAULT);
 894 
 895                 ASSERT(auxflags_auxv32.a_type == AT_SUN_AUXFLAGS);
 896                 auxflags_auxv32.a_un.a_val |= AF_SUN_NOPLM;
 897                 if (copyout(&auxflags_auxv32, args->auxp_auxflags,
 898                     sizeof (auxflags_auxv32)) != 0)
 899                         return (EFAULT);
 900         }
 901 #endif  /* _LP64 */
 902 
 903         /* Second, copy out the brand specific aux vectors. */
 904         if (args->to_model == DATAMODEL_NATIVE) {
 905                 auxv_t brand_auxv[] = {
 906                     { AT_SUN_BRAND_AUX1, {0} },
 907                     { AT_SUN_BRAND_AUX2, {0} },
 908                     { AT_SUN_BRAND_AUX3, {0} }
 909                 };
 910 
 911                 ASSERT(brand_auxv[0].a_type ==
 912                     AT_SUN_BRAND_COMMON_LDDATA);
 913                 brand_auxv[0].a_un.a_val = sed.sed_lddata;
 914 
 915                 if (copyout(&brand_auxv, args->auxp_brand,
 916                     sizeof (brand_auxv)) != 0)
 917                         return (EFAULT);
 918         }
 919 #if defined(_LP64)
 920         else {
 921                 auxv32_t brand_auxv32[] = {
 922                     { AT_SUN_BRAND_AUX1, {0} },
 923                     { AT_SUN_BRAND_AUX2, {0} },
 924                     { AT_SUN_BRAND_AUX3, {0} }
 925                 };
 926 
 927                 ASSERT(brand_auxv32[0].a_type == AT_SUN_BRAND_COMMON_LDDATA);
 928                 brand_auxv32[0].a_un.a_val = (uint32_t)sed.sed_lddata;
 929                 if (copyout(&brand_auxv32, args->auxp_brand,
 930                     sizeof (brand_auxv32)) != 0)
 931                         return (EFAULT);
 932         }
 933 #endif  /* _LP64 */
 934 
 935         /*
 936          * Third, the /proc aux vectors set up by elfexec() point to
 937          * brand emulation library and it's linker.  Copy these to the
 938          * /proc brand specific aux vector, and update the regular
 939          * /proc aux vectors to point to the executable (and it's
 940          * linker).  This will enable debuggers to access the
 941          * executable via the usual /proc or elf notes aux vectors.
 942          *
 943          * The brand emulation library's linker will get it's aux
 944          * vectors off the stack, and then update the stack with the