[PATCH Gold] Recognize clang-style crtbegin and crtend files
augustine.sterling@gmail.com
augustine.sterling@gmail.com
Wed Jan 8 16:58:00 GMT 2020
On Tue, Jan 7, 2020 at 5:26 PM Cary Coutant <ccoutant@gmail.com> wrote:
> + if (*(base_name + match_len) != '.' &&
> + *(base_name + match_len) != '-')
> + return false;
>
> Please write these as base_name[match_len].
Updated.
> This seems to imply that the filename convention is not
> clang_rt.crtbegin-<target>.o, but instead
> clang_rt.<target>.crtbegin.o.
To the best of my knowledge, clang never uses this form. I haven't
seen it in the wild.
> Can you clarify which of these two naming conventions you intend to
> support? If it's the former, this patch is OK with the above change.
> If the latter, I think you'll need to adjust this patch.
Clang uses two forms of its own (plus all of the gcc ones), which can
be found in clang/lib/Driver/ToolChain.cpp:416:
$(target_directory)/clang_rt.crtbegin.o
clang_rt.crtbegin-$target.o
This updated patch supports both of those forms.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gold.crt.patch
Type: text/x-patch
Size: 1950 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20200108/ad7d1fc8/attachment.bin>
More information about the Binutils
mailing list