[PATCH][GOLD] Add __exidx_start and __exidx_end symbols.

Ian Lance Taylor iant@google.com
Thu Dec 3 22:55:00 GMT 2009


"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



More information about the Binutils mailing list