[PATCH] D19190: [ELF] - Implemented PROVIDE linker script command.

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 19 07:42:49 PDT 2016


On 19 April 2016 at 09:55, George Rimar <grimar at accesssoftek.com> wrote:
> grimar added inline comments.
>
> ================
> Comment at: test/ELF/linkerscript-provide.s:49
> @@ +48,3 @@
> +# CHECK-NEXT:      Other: 0
> +# CHECK-NEXT:      Section: Absolute
> +# CHECK-NEXT:    }
> ----------------
> rafael wrote:
>> Are these symbols produced as absolute by bfd and gold?
>>
>> It would be really nice if they could be produced with an output section and offset.  The advantaged is that offsets can be computed earlier. With that some day we could cleanup relocation processing further by representing relocation target as OutputSection + Offset. That way we would not need enums just to select getVA, getGotVA, getPltVA, etc.
>>
> bfd and gold disagree here:
>
>
> ```
>  PROVIDE (begin_ext = .);
>  .plus :
>  {
>   PROVIDE (begin_sec = .);
>   *(.plus)
>   PROVIDE (end_sec = .);
>  }
>  PROVIDE (end_ext = .);
> ```
>

If at all possible my preference would be:

* Require PRODIVE to be in an unambiguous location: inside an
OutputSection definition.
* Produce DefinedSynthetic symbols for them so that the section is set
correctly.

Cheers,
Rafael


More information about the llvm-commits mailing list