This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
Attached is an updated patch. I changed the interface to that
compute_final_local_value takes two pointers, one for input and the
other output symbol value. I also renamed the inline function and
fixed the indentation.
-Doug
在 2010年9月8日上午8:03,Ian Lance Taylor <iant@google.com> 寫道:
> "Doug Kwan (關振德)" <dougkwan@google.com> writes:
>
>> + if (!is_ordinary)
>> + {
>> + if (shndx == elfcpp::SHN_ABS || Symbol::is_common_shndx(shndx))
>> + lv->set_output_value(lv->input_value());
>> + else
>> + {
>> + this->error(_("unknown section index %u for local symbol %u"),
>> + shndx, r_sym);
>> + lv->set_output_value(0);
>> + return This::CFLV_ERROR;
>> + }
>> + }
>
> The indentation looks wrong here.
>
>> + // Compute final local symbol value. R_SYM is the index of a local
>> + // symbol in symbol table. LV points to a symbol value, which is
>> + // expected to hold the input value and to be over-written by the
>> + // final value. SYMTAB points to a symbol table. Some targets may want
>> + // to know would-be-finalized local symbol values in relaxation.
>> + // Hence we provide this method. Since this method updates *LV, a
>> + // callee should make a copy of the original local symbol value and
>> + // use the copy instead of modifying an object's local symbols before
>> + // everything is finalized. The caller should also free up any allocated
>> + // memory in the return value in *LV.
>> + Compute_final_local_value_status
>> + compute_final_local_value(unsigned int r_sym, Symbol_value<size>*lv,
>> + const Symbol_table* symtab);
>
> This interface seems overly complicated, because of the way it changes
> *lv. A local symbol value is represented in two values: a number and a
> Merged_symbol_value. Can you change this function to take a const
> Symbol_value pointer and to return those two values?
>
> Also I'm not sure the internal and external functions should have the
> same name.
>
> Also there should be a space after Symbol_value<size>*.
>
> Ian
>
Attachment:
patch-cortex-a8.txt
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |