[lto][patch] Add initial gold plugin

Rafael Espindola espindola@google.com
Mon Sep 1 14:35:00 GMT 2008


>> -get_section (Elf *elf, const char *name)
>> +static enum ld_plugin_status
>> +add_symbols (const void *handle, int nsyms,
>> +            const struct ld_plugin_symbol *syms)
>>  {
>> -  const char *string_table = get_string_table (elf);
>> -  Elf_Scn *section = 0;
>> -  while ((section = elf_nextscn(elf, section)) != 0)
>> +  const char *kind_str[] = {"DEF", "WEAKDEF", "UNDEF",
>> +                           "WEAKUNDEF", "COMMON"};
>> +  const char *visibility_str[] = {"DEFAULT", "PROTECTED",
>> +                                 "INTERNAL", "HIDDEN"};
>> +  const char *resolution_str[] = {"UNKNOWN", "UNDEF",
>> +                                 "PREVAILING_DEF",
>> +                                 "PREVAILING_DEF_IRONLY",
>> +                                 "PREEMPTED_REG",
>> +                                 "PREEMPTED_IR",
>> +                                 "RESOLVED_IR",
>> +                                 "RESOLVED_EXEC",
>> +                                 "RESOLVED_DYN"};
>
> Move to a header file?

Cary, what do you think. Should this be it plugin-api.h? These arrays
are indexed with enums defined there.

> The rest looks fine.
An updated version is attached. Could you please take another look?


>
> Thanks.  Diego.
>


Thanks,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047



More information about the Gcc-patches mailing list