Print this page
code review from Robert


1257                  * .SUNW_capinfo section.
1258                  */
1259                 if (ofl->ofl_oscapinfo)
1260                         cnt++;                  /* DT_SUNW_CAPINFO */
1261 
1262                 /*
1263                  * Capabilities chain information requires a .SUNW_capchain
1264                  * entry (DT_SUNW_CAPCHAIN), entry size (DT_SUNW_CAPCHAINENT),
1265                  * and total size (DT_SUNW_CAPCHAINSZ).
1266                  */
1267                 if (ofl->ofl_oscapchain)
1268                         cnt += 3;
1269 
1270                 if (flags & FLG_OF_SYMBOLIC)
1271                         cnt++;                  /* DT_SYMBOLIC */
1272 
1273                 if (ofl->ofl_aslr != 0)              /* DT_SUNW_ASLR */
1274                         cnt++;
1275         }
1276 

1277         if (ofl->ofl_flags & FLG_OF_KMOD)
1278                 cnt++;
1279 
1280         /*
1281          * Account for Architecture dependent .dynamic entries, and defaults.
1282          */
1283         (*ld_targ.t_mr.mr_mach_make_dynamic)(ofl, &cnt);
1284 
1285         /*
1286          * DT_FLAGS, DT_FLAGS_1, DT_SUNW_STRPAD, and DT_NULL. Also,
1287          * allow room for the unused extra DT_NULLs. These are included
1288          * to allow an ELF editor room to add items later.
1289          */
1290         cnt += 4 + DYNAMIC_EXTRA_ELTS;
1291 
1292         /*
1293          * DT_SUNW_LDMACH. Used to hold the ELF machine code of the
1294          * linker that produced the output object. This information
1295          * allows us to determine whether a given object was linked
1296          * natively, or by a linker running on a different type of




1257                  * .SUNW_capinfo section.
1258                  */
1259                 if (ofl->ofl_oscapinfo)
1260                         cnt++;                  /* DT_SUNW_CAPINFO */
1261 
1262                 /*
1263                  * Capabilities chain information requires a .SUNW_capchain
1264                  * entry (DT_SUNW_CAPCHAIN), entry size (DT_SUNW_CAPCHAINENT),
1265                  * and total size (DT_SUNW_CAPCHAINSZ).
1266                  */
1267                 if (ofl->ofl_oscapchain)
1268                         cnt += 3;
1269 
1270                 if (flags & FLG_OF_SYMBOLIC)
1271                         cnt++;                  /* DT_SYMBOLIC */
1272 
1273                 if (ofl->ofl_aslr != 0)              /* DT_SUNW_ASLR */
1274                         cnt++;
1275         }
1276 
1277         /* DT_SUNW_KMOD */
1278         if (ofl->ofl_flags & FLG_OF_KMOD)
1279                 cnt++;
1280 
1281         /*
1282          * Account for Architecture dependent .dynamic entries, and defaults.
1283          */
1284         (*ld_targ.t_mr.mr_mach_make_dynamic)(ofl, &cnt);
1285 
1286         /*
1287          * DT_FLAGS, DT_FLAGS_1, DT_SUNW_STRPAD, and DT_NULL. Also,
1288          * allow room for the unused extra DT_NULLs. These are included
1289          * to allow an ELF editor room to add items later.
1290          */
1291         cnt += 4 + DYNAMIC_EXTRA_ELTS;
1292 
1293         /*
1294          * DT_SUNW_LDMACH. Used to hold the ELF machine code of the
1295          * linker that produced the output object. This information
1296          * allows us to determine whether a given object was linked
1297          * natively, or by a linker running on a different type of