Lines Matching refs:mf

48 typedef Token (*dir_func_t)(Mapfile *mf);
52 * mf - Mapfile descriptor
58 typedef Token (* attr_func_t)(Mapfile *mf, Token eq_tok, void *uvalue);
66 typedef void (* gts_efunc_t)(Mapfile *mf, Token tok, ld_map_tkval_t *tkv);
132 * mf - Mapfile descriptor
142 gettoken_eq(Mapfile *mf, attr_fmt_t eq_type, const char *lhs)
149 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
182 mf_fatal(mf, err, lhs, ld_map_tokenstr(tok, &tkv, &inv_buf));
225 * mf - Mapfile descriptor
237 set_capmask(Mapfile *mf, Capmask *capmask, Token eq_tok,
241 DBG_CALL(Dbg_cap_mapfile_title(mf->mf_ofl->ofl_lml,
242 mf->mf_lineno));
243 DBG_CALL(Dbg_cap_val_entry(mf->mf_ofl->ofl_lml, DBG_STATE_CURRENT,
250 ld_map_cap_set_ovflag(mf, type);
251 DBG_CALL(Dbg_cap_val_entry(mf->mf_ofl->ofl_lml,
256 DBG_CALL(Dbg_cap_val_entry(mf->mf_ofl->ofl_lml,
262 DBG_CALL(Dbg_cap_val_entry(mf->mf_ofl->ofl_lml,
273 if (!ld_map_cap_sanitize(mf, type, capmask))
277 DBG_CALL(Dbg_cap_val_entry(mf->mf_ofl->ofl_lml,
287 * mf - Mapfile descriptor
299 set_capstr(Mapfile *mf, Caplist *caplist, Token eq_tok,
306 DBG_CALL(Dbg_cap_mapfile_title(mf->mf_ofl->ofl_lml, mf->mf_lineno));
309 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
313 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
335 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
339 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
342 ld_map_cap_set_ovflag(mf, type);
376 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
411 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
422 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
426 DBG_CALL(Dbg_cap_ptr_entry(mf->mf_ofl->ofl_lml,
439 * mf - Mapfile descriptor
446 gettoken_optattr(Mapfile *mf, const char *lhs)
452 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
459 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEMLBKT), lhs,
469 * mf - Mapfile descriptor
476 gettoken_term(Mapfile *mf, const char *lhs)
482 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
489 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEMRBKT), lhs,
498 * mf - Mapfile descriptor
505 gettoken_semicolon(Mapfile *mf, const char *lhs)
511 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
517 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEM), lhs,
526 * mf - Mapfile descriptor
534 gettoken_leftbkt(Mapfile *mf, const char *lhs)
540 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
546 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_LBKT), lhs,
555 * mf - Mapfile descriptor
563 gettoken_int(Mapfile *mf, const char *lhs, ld_map_tkval_t *tkv)
568 switch (tok = ld_map_gettoken(mf, 0, tkv)) {
574 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_INT), lhs,
583 * mf - Mapfile descriptor
593 gettoken_str(Mapfile *mf, int flags, ld_map_tkval_t *tkv, gts_efunc_t efunc)
597 switch (tok = ld_map_gettoken(mf, flags, tkv)) {
604 (* efunc)(mf, tok, tkv);
622 * mf - Mapfile descriptor
643 parse_attributes(Mapfile *mf, const char *item_name, attr_t *attr_list,
655 switch (tok = ld_map_gettoken(mf, TK_F_KEYWORD, &tkv)) {
681 op_tok = gettoken_eq(mf, attr->at_fmt,
688 switch (tok = attr->at_func(mf, op_tok, uvalue)) {
712 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_ATTR),
724 mf_fatal(mf, MSG_INTL(MSG_MAP_NOATTR), item_name);
737 * mf - Mapfile descriptor
745 parse_segment_flags(Mapfile *mf, Xword *flags)
791 switch (tok = ld_map_gettoken(mf, TK_F_KEYWORD, &tkv)) {
836 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEGFLAG),
848 mf_fatal(mf, MSG_INTL(MSG_MAP_NOVALUES),
866 * mf - Mapfile descriptor
878 parse_cap_mask(Mapfile *mf, Token eq_tok, Capmask *capmask,
889 switch (tok = ld_map_gettoken(mf, TK_F_KEYWORD, &tkv)) {
912 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_CAPMASK),
918 if (!set_capmask(mf, capmask, eq_tok, type, value, TRUE))
929 * mf - Mapfile descriptor
939 parse_cap_list(Mapfile *mf, Token eq_tok, Caplist *caplist,
951 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
977 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_CAPNAME),
983 if (!set_capstr(mf, caplist, eq_tok, type, strs))
994 at_cap_hw(Mapfile *mf, Token eq_tok, void *uvalue)
1004 switch (tok = ld_map_gettoken(mf, TK_F_KEYWORD, &tkv)) {
1028 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_CAPHW),
1034 if (!set_capmask(mf, &mf->mf_ofl->ofl_ocapset.oc_hw_1, eq_tok,
1037 if (!set_capmask(mf, &mf->mf_ofl->ofl_ocapset.oc_hw_2, eq_tok,
1049 at_cap_hw_1(Mapfile *mf, Token eq_tok, void *uvalue)
1051 return (parse_cap_mask(mf, eq_tok, &mf->mf_ofl->ofl_ocapset.oc_hw_1,
1061 at_cap_hw_2(Mapfile *mf, Token eq_tok, void *uvalue)
1063 return (parse_cap_mask(mf, eq_tok, &mf->mf_ofl->ofl_ocapset.oc_hw_2,
1073 at_cap_sf(Mapfile *mf, Token eq_tok, void *uvalue)
1083 switch (tok = ld_map_gettoken(mf, TK_F_KEYWORD, &tkv)) {
1102 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_CAPSF),
1108 if (!set_capmask(mf, &mf->mf_ofl->ofl_ocapset.oc_sf_1, eq_tok,
1121 at_cap_sf_1(Mapfile *mf, Token eq_tok, void *uvalue)
1123 return (parse_cap_mask(mf, eq_tok, &mf->mf_ofl->ofl_ocapset.oc_sf_1,
1133 at_cap_mach(Mapfile *mf, Token eq_tok, void *uvalue)
1135 return (parse_cap_list(mf, eq_tok, &mf->mf_ofl->ofl_ocapset.oc_mach,
1145 at_cap_plat(Mapfile *mf, Token eq_tok, void *uvalue)
1147 return (parse_cap_list(mf, eq_tok, &mf->mf_ofl->ofl_ocapset.oc_plat,
1158 dir_capability(Mapfile *mf)
1201 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
1206 capstr = &mf->mf_ofl->ofl_ocapset.oc_id;
1213 DBG_CALL(Dbg_cap_id(mf->mf_ofl->ofl_lml, mf->mf_lineno,
1217 mf->mf_ofl->ofl_ocapset.oc_flags |= FLG_OCS_USRDEFID;
1223 switch (tok = gettoken_optattr(mf, capstr->cs_str)) {
1238 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_CAPID),
1245 if (parse_attributes(mf, MSG_ORIG(MSG_MAPKW_CAPABILITY),
1250 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_CAPABILITY)));
1257 gts_efunc_at_dv_allow(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
1261 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_VERSION),
1271 at_dv_allow(Mapfile *mf, Token eq_tok, void *uvalue)
1275 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_dv_allow) == TK_ERROR)
1279 if (!ld_map_dv_entry(mf, uvalue, FALSE, tkv.tkv_str))
1283 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_ALLOW)));
1290 gts_efunc_at_dv_require(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
1294 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_VERSION),
1304 at_dv_require(Mapfile *mf, Token eq_tok, void *uvalue)
1309 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_dv_require) == TK_ERROR)
1313 if (!ld_map_dv_entry(mf, uvalue, TRUE, tkv.tkv_str))
1317 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_REQUIRE)));
1324 gts_efunc_dir_depend_versions(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
1328 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_OBJNAM),
1340 dir_depend_versions(Mapfile *mf)
1363 if (gettoken_str(mf, 0, &tkv, gts_efunc_dir_depend_versions) ==
1368 if ((sdf = ld_map_dv(mf, tkv.tkv_str)) == NULL)
1372 if (gettoken_leftbkt(mf, tkv.tkv_str) == TK_ERROR)
1376 if (parse_attributes(mf, MSG_ORIG(MSG_MAPKW_DEPEND_VERSIONS),
1381 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_DEPEND_VERSIONS)));
1391 dir_hdr_noalloc(Mapfile *mf)
1393 mf->mf_ofl->ofl_dtflags_1 |= DF_1_NOHDR;
1394 DBG_CALL(Dbg_map_hdr_noalloc(mf->mf_ofl->ofl_lml, mf->mf_lineno));
1397 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_HDR_NOALLOC)));
1407 dir_phdr_add_null(Mapfile *mf)
1413 if (gettoken_eq(mf, ATTR_FMT_EQ,
1418 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_PHDR_ADD_NULL), &tkv) ==
1426 if (ld_map_seg_insert(mf, DBG_STATE_NEW, sgp, 0) ==
1432 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_PHDR_ADD_NULL)));
1441 at_seg_align(Mapfile *mf, Token eq_tok, void *uvalue)
1447 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_ALIGN), &tkv) == TK_ERROR)
1454 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_ALIGN)));
1461 gts_efunc_at_seg_assign_file_basename(Mapfile *mf, Token tok,
1466 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_FILNAM),
1477 at_seg_assign_file_basename(Mapfile *mf, Token eq_tok, void *uvalue)
1483 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_seg_assign_file_basename) ==
1487 if (!ld_map_seg_ent_files(mf, enp, TYP_ECF_BASENAME, tkv.tkv_str))
1491 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_FILE_BASENAME)));
1498 gts_efunc_at_seg_assign_file_objname(Mapfile *mf, Token tok,
1503 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_OBJNAM),
1514 at_seg_assign_file_objname(Mapfile *mf, Token eq_tok, void *uvalue)
1520 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_seg_assign_file_objname) ==
1524 if (!ld_map_seg_ent_files(mf, enp, TYP_ECF_OBJNAME, tkv.tkv_str))
1528 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_FILE_OBJNAME)));
1535 gts_efunc_at_seg_assign_file_path(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
1539 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_FILPATH),
1550 at_seg_assign_file_path(Mapfile *mf, Token eq_tok, void *uvalue)
1556 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_seg_assign_file_path) ==
1560 if (!ld_map_seg_ent_files(mf, enp, TYP_ECF_PATH, tkv.tkv_str))
1564 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_FILE_PATH)));
1573 at_seg_assign_flags(Mapfile *mf, Token eq_tok, void *uvalue)
1609 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
1616 mf_fatal0(mf, MSG_INTL(MSG_MAP_SFLG_ONEBANG));
1644 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SECFLAG),
1659 mf_fatal0(mf, MSG_INTL(MSG_MAP_SFLG_EXBANG));
1665 mf_fatal(mf, MSG_INTL(MSG_MAP_NOVALUES),
1677 gts_efunc_at_seg_assign_is_name(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
1681 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SECNAM),
1691 at_seg_assign_is_name(Mapfile *mf, Token eq_tok, void *uvalue)
1697 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_seg_assign_is_name) ==
1703 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_IS_NAME)));
1710 gts_efunc_at_seg_assign_type(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
1714 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SHTYPE),
1724 at_seg_assign_type(Mapfile *mf, Token eq_tok, void *uvalue)
1731 if (gettoken_str(mf, TK_F_KEYWORD, &tkv,
1755 gts_efunc_at_seg_assign_type(mf, TK_STRING, &tkv);
1763 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_TYPE)));
1772 at_seg_assign(Mapfile *mf, Token eq_tok, void *uvalue)
1816 tok = ld_map_gettoken(mf, 0, &tkv);
1823 tok = ld_map_gettoken(mf, 0, &tkv);
1828 if ((enp = ld_map_seg_ent_add(mf, sgp, name)) == NULL)
1834 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEMLBKT),
1847 if (parse_attributes(mf, MSG_ORIG(MSG_MAPKW_ASSIGN_SECTION),
1852 tok = gettoken_term(mf, MSG_ORIG(MSG_MAPKW_ASSIGN_SECTION));
1858 DBG_CALL(Dbg_map_ent(mf->mf_ofl->ofl_lml, enp, mf->mf_ofl,
1859 mf->mf_lineno));
1869 at_seg_disable(Mapfile *mf, Token eq_tok, void *uvalue)
1875 mf_fatal(mf, MSG_INTL(MSG_MAP_CNTDISSEG), sgp->sg_name);
1883 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_DISABLE)));
1898 at_seg_flags(Mapfile *mf, Token eq_tok, void *uvalue)
1904 tok = parse_segment_flags(mf, &flags);
1920 at_seg_is_order(Mapfile *mf, Token eq_tok, void *uvalue)
1941 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
1950 enp = ld_ent_lookup(mf->mf_ofl, tkv.tkv_str, NULL);
1952 mf_fatal(mf, MSG_INTL(MSG_MAP_UNKENT),
1962 mf_fatal(mf,
1980 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_ECNAM),
1995 at_seg_max_size(Mapfile *mf, Token eq_tok, void *uvalue)
2001 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_MAX_SIZE), &tkv) == TK_ERROR)
2008 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_MAX_SIZE)));
2017 at_seg_nohdr(Mapfile *mf, Token eq_tok, void *uvalue)
2034 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_NOHDR)));
2043 at_seg_os_order(Mapfile *mf, Token eq_tok, void *uvalue)
2062 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
2067 if (!ld_map_seg_os_order_add(mf, sgp, tkv.tkv_str))
2077 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SECNAM),
2092 at_seg_paddr(Mapfile *mf, Token eq_tok, void *uvalue)
2101 for (APLIST_TRAVERSE(mf->mf_ofl->ofl_segs_order, idx, sgp2))
2103 mf_fatal(mf,
2109 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_PADDR), &tkv) == TK_ERROR)
2116 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_PADDR)));
2125 at_seg_round(Mapfile *mf, Token eq_tok, void *uvalue)
2131 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_ROUND), &tkv) == TK_ERROR)
2138 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_ROUND)));
2147 at_seg_size_symbol(Mapfile *mf, Token eq_tok, void *uvalue)
2159 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
2164 if (!ld_map_seg_size_symbol(mf, sgp, eq_tok,
2184 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SYMNAM),
2193 mf_fatal(mf, MSG_INTL(MSG_MAP_NOVALUES),
2207 at_seg_vaddr(Mapfile *mf, Token eq_tok, void *uvalue)
2216 for (APLIST_TRAVERSE(mf->mf_ofl->ofl_segs_order, idx, sgp2))
2218 mf_fatal(mf,
2224 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_VADDR), &tkv) == TK_ERROR)
2231 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_VADDR)));
2245 * mf - Mapfile descriptor ({LOAD|NOTE|NULL}_SEGMENT)
2255 dir_segment_inner(Mapfile *mf, const char *dir_name, Word seg_type,
2266 if (gettoken_str(mf, 0, &tkv, gts_efunc) == TK_ERROR)
2268 sgp = ld_seg_lookup(mf->mf_ofl, tkv.tkv_str, &where);
2281 mf_fatal(mf, MSG_INTL(MSG_MAP_EXPSEGTYPE),
2296 ndx = ld_map_seg_index(mf, sgp);
2297 DBG_CALL(Dbg_map_seg(mf->mf_ofl, DBG_STATE_MOD_BEFORE,
2298 ndx, sgp, mf->mf_lineno));
2305 switch (tok = gettoken_optattr(mf, dir_name)) {
2313 if (parse_attributes(mf, dir_name,
2318 tok = gettoken_semicolon(mf, dir_name);
2330 if (ld_map_seg_insert(mf, DBG_STATE_NEW, sgp, where) ==
2335 DBG_CALL(Dbg_map_seg(mf->mf_ofl, DBG_STATE_MOD_AFTER,
2336 ndx, sgp, mf->mf_lineno));
2346 gts_efunc_dir_load_segment(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
2350 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEGNAM),
2362 dir_load_segment(Mapfile *mf)
2405 return (dir_segment_inner(mf, MSG_ORIG(MSG_MAPKW_LOAD_SEGMENT),
2437 gts_efunc_dir_note_segment(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
2441 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEGNAM),
2453 dir_note_segment(Mapfile *mf)
2455 return (dir_segment_inner(mf, MSG_ORIG(MSG_MAPKW_NOTE_SEGMENT),
2465 gts_efunc_dir_null_segment(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
2469 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEGNAM),
2481 dir_null_segment(Mapfile *mf)
2483 return (dir_segment_inner(mf, MSG_ORIG(MSG_MAPKW_NULL_SEGMENT),
2495 dir_segment_order(Mapfile *mf)
2505 tok = gettoken_eq(mf, ATTR_FMT_EQ_PEQ,
2510 DBG_CALL(Dbg_map_seg_order(mf->mf_ofl, ELFOSABI_SOLARIS,
2511 ld_targ.t_m.m_mach, DBG_STATE_MOD_BEFORE, mf->mf_lineno));
2518 aplist_reset(mf->mf_ofl->ofl_segs_order);
2522 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
2530 sgp = ld_seg_lookup(mf->mf_ofl, tkv.tkv_str, NULL);
2532 mf_fatal(mf, MSG_INTL(MSG_MAP_UNKSEG),
2540 for (APLIST_TRAVERSE(mf->mf_ofl->ofl_segs_order,
2543 mf_fatal(mf,
2555 mf_fatal(mf, MSG_INTL(MSG_MAP_CNTADDRORDER),
2562 if (aplist_append(&mf->mf_ofl->ofl_segs_order, sgp,
2572 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SEGNAM),
2579 DBG_CALL(Dbg_map_seg_order(mf->mf_ofl, ELFOSABI_SOLARIS,
2580 ld_targ.t_m.m_mach, DBG_STATE_MOD_AFTER, mf->mf_lineno));
2592 dir_stack(Mapfile *mf)
2614 if (gettoken_leftbkt(mf, MSG_ORIG(MSG_MAPKW_STACK)) == TK_ERROR)
2618 sgp = ld_map_seg_stack(mf);
2621 if (parse_attributes(mf, MSG_ORIG(MSG_MAPKW_STACK),
2626 tok = gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_STACK));
2631 Xword ndx = ld_map_seg_index(mf, sgp);
2633 Dbg_map_seg(mf->mf_ofl, DBG_STATE_MOD_AFTER, ndx, sgp,
2634 mf->mf_lineno);
2644 gts_efunc_at_sym_aux(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
2648 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_OBJNAM),
2658 at_sym_aux(Mapfile *mf, Token eq_tok, void *uvalue)
2664 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_sym_aux) == TK_ERROR)
2667 ld_map_sym_filtee(mf, &ss->ss_mv, &ss->ss_ms, FLG_SY_AUXFLTR,
2671 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_AUX)));
2678 gts_efunc_at_sym_filter(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
2682 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_OBJNAM),
2692 at_sym_filter(Mapfile *mf, Token eq_tok, void *uvalue)
2698 if (gettoken_str(mf, 0, &tkv, gts_efunc_at_sym_filter) == TK_ERROR)
2701 ld_map_sym_filtee(mf, &ss->ss_mv, &ss->ss_ms, FLG_SY_STDFLTR,
2705 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_FILTER)));
2714 at_sym_flags(Mapfile *mf, Token eq_tok, void *uvalue)
2754 Ofl_desc *ofl = mf->mf_ofl;
2757 switch (tok = ld_map_gettoken(mf, TK_F_KEYWORD, &tkv)) {
2799 mf_fatal0(mf,
2834 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SYMFLAG),
2847 mf_fatal(mf, MSG_INTL(MSG_MAP_NOVALUES),
2861 at_sym_size(Mapfile *mf, Token eq_tok, void *uvalue)
2867 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_SIZE), &tkv) == TK_ERROR)
2873 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_SIZE)));
2904 gts_efunc_at_sym_type(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
2909 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SYMTYPE),
2921 at_sym_type(Mapfile *mf, Token eq_tok, void *uvalue)
2928 if (gettoken_str(mf, TK_F_KEYWORD, &tkv, gts_efunc_at_sym_type) ==
2935 gts_efunc_at_sym_type(mf, TK_STRING, &tkv);
2944 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_TYPE)));
2953 at_sym_value(Mapfile *mf, Token eq_tok, void *uvalue)
2959 if (gettoken_int(mf, MSG_ORIG(MSG_MAPKW_VALUE), &tkv) == TK_ERROR)
2967 return (gettoken_term(mf, MSG_ORIG(MSG_MAPKW_VALUE)));
2974 * mf - Mapfile descriptor
2984 parse_symbol_attributes(Mapfile *mf, const char *dir_name, symbol_state_t *ss)
3026 switch (tok = ld_map_gettoken(mf, 0, &tkv_sym)) {
3056 switch (tok = ld_map_gettoken(mf, 0, &tkv)) {
3061 ld_map_sym_scope(mf, tkv_sym.tkv_str,
3066 if (parse_attributes(mf, tkv_sym.tkv_str,
3071 tok = gettoken_term(mf,
3089 if (!ld_map_sym_enter(mf, &ss->ss_mv,
3094 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SYMDELIM),
3114 ld_map_sym_autoreduce(mf, &ss->ss_mv);
3120 switch (tok = gettoken_term(mf, dir_name)) {
3130 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_SYM),
3156 dir_symbol_scope(Mapfile *mf)
3161 if (gettoken_leftbkt(mf, MSG_ORIG(MSG_MAPKW_SYMBOL_SCOPE)) == TK_ERROR)
3165 if (!ld_map_sym_ver_init(mf, NULL, &ss.ss_mv))
3169 if (parse_symbol_attributes(mf, MSG_ORIG(MSG_MAPKW_SYMBOL_SCOPE),
3174 return (gettoken_semicolon(mf, MSG_ORIG(MSG_MAPKW_SYMBOL_SCOPE)));
3182 gts_efunc_dir_symbol_version(Mapfile *mf, Token tok, ld_map_tkval_t *tkv)
3186 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_VERSION),
3198 dir_symbol_version(Mapfile *mf)
3205 if (gettoken_str(mf, 0, &tkv, gts_efunc_dir_symbol_version) == TK_ERROR)
3209 if (gettoken_leftbkt(mf, MSG_ORIG(MSG_MAPKW_SYMBOL_VERSION)) ==
3214 if (!ld_map_sym_ver_init(mf, tkv.tkv_str, &ss.ss_mv))
3218 if (parse_symbol_attributes(mf, MSG_ORIG(MSG_MAPKW_SYMBOL_VERSION),
3226 if (!ld_map_sym_ver_fini(mf, &ss.ss_mv))
3237 ld_map_parse_v2(Mapfile *mf)
3286 tok = ld_map_gettoken(mf, TK_F_EOFOK | TK_F_KEYWORD, &tkv);
3304 if (tldir->func(mf) == TK_ERROR)
3312 mf_fatal(mf, MSG_INTL(MSG_MAP_EXP_DIR),