diff options
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r-- | gas/config/tc-ppc.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index ff63dfc..ef4341f 100644 --- a/gas/config/tc-ppc.c +++ b/gas/config/tc-ppc.c @@ -3168,7 +3168,10 @@ ppc_function (ignore) } /* The .bf pseudo-op. This is just like a COFF C_FCN symbol named - ".bf". */ + ".bf". If the pseudo op .bi was seen before .bf, patch the .bi sym + with the correct line number */ + +static symbolS *saved_bi_sym = 0; static void ppc_bf (ignore) @@ -3187,6 +3190,14 @@ ppc_bf (ignore) S_SET_NUMBER_AUXILIARY (sym, 1); SA_SET_SYM_LNNO (sym, coff_line_base); + /* Line number for bi. */ + if (saved_bi_sym) + { + S_SET_VALUE (saved_bi_sym, coff_n_line_nos); + saved_bi_sym = 0; + } + + symbol_get_tc (sym)->output = 1; ppc_frob_label (sym); @@ -3220,7 +3231,8 @@ ppc_ef (ignore) /* The .bi and .ei pseudo-ops. These take a string argument and generates a C_BINCL or C_EINCL symbol, which goes at the start of - the symbol list. */ + the symbol list. The value of .bi will be know when the next .bf + is encountered. */ static void ppc_biei (ei) @@ -3250,6 +3262,12 @@ ppc_biei (ei) S_SET_STORAGE_CLASS (sym, ei ? C_EINCL : C_BINCL); symbol_get_tc (sym)->output = 1; + /* Save bi. */ + if (ei) + saved_bi_sym = 0; + else + saved_bi_sym = sym; + for (look = last_biei ? last_biei : symbol_rootP; (look != (symbolS *) NULL && (S_GET_STORAGE_CLASS (look) == C_FILE |