This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH][GOLD] Add __exidx_start and __exidx_end symbols.
"Doug Kwan (éæå)" <dougkwan@google.com> writes:
>>>> This patch add __exidx_start and __exidx_end section symbols for
>>>> the .ARM.exidx section.
> - // For the ARM target, we need to add a PT_ARM_EXIDX segment for
> - // the .ARM.exidx section.
> - if (!layout->script_options()->saw_phdrs_clause()
> - && !parameters->options().relocatable())
> + // Hanlde the .ARM.exidx section.
s/Hanlde/Handle/
> + Output_section* exidx_section = layout->find_output_section(".ARM.exidx");
> + if (exidx_section != NULL
> + && exidx_section->type() == elfcpp::SHT_ARM_EXIDX)
> {
> - Output_section* exidx_section =
> - layout->find_output_section(".ARM.exidx");
> + // Create __exidx_start and __exdix_end symbols.
> + symtab->define_in_output_data("__exidx_start", NULL, exidx_section,
> + 0, 0, elfcpp::STT_OBJECT,
> + elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN, 0,
> + false, false);
> + symtab->define_in_output_data("__exidx_end", NULL, exidx_section,
> + 0, 0, elfcpp::STT_OBJECT,
> + elfcpp::STB_LOCAL, elfcpp::STV_HIDDEN, 0,
> + true, false);
These symbols should not be defined if
parameters->options.relocatable().
This is OK with those changes.
Thanks.
Ian