[RFC PATCH] Don't use ELF weak for entities with vague linkage when COMDAT groups are available
Julian Brown
julian@codesourcery.com
Wed Apr 13 15:07:00 GMT 2005
Mark Mitchell wrote:
> Julian Brown wrote:
>
>> Hi,
>>
>> This is a patch to disable ELF weak for entities with vague linkage
>> when HAVE_GAS_COMDAT_GROUP is true. It was previously posted in two
>> parts and applied, then reverted soon after for causing breakage:
>
>
>> If people would try this patch and run the testsuite on their
>> machines, I'd be grateful. I'd appreciate it if you post information
>> about failures which show up for you, with version numbers of binutils
>> bits, so I can attempt to track down whatever broke before.
>
>
> You've been met with deafening silence, which is disappointing.
>
> As a result, I'm going to approve the patch again. After you check it
> in, please watch carefully for failure reports. If you're reporting a
> failure with this patch, *please* include assembler and linker versions,
> so that Julian has a shot at reproducing the problem.
>
> (I am suspicious that there are systems out there that have an assembler
> with COMDAT support, but a linker without, and that this is the cause of
> the problem. In that case, the fix will be to tweak the configure
> script not to define HAVE_GAS_COMDAT in that case. Or, at least, to
> provide a --disable-comdat option.)
>
> Julian, if problems appear, please do not revert the patch immediately.
> Instead, please immediately disable it on the affected target system by
> temporarily adding the old definition of MAKE_DECL_ONE_ONLY to the
> affected target system. And keep track so that we can undo this hackery
> once the problem is resolved.
>
> If you get more reports of problems on more than two systems, then
> dorevert your patch -- but put the new definition of MAKE_DECL_ONE_ONLY
> in an appropriate config/arm header file, so that at least we have it
> there, where it originated.
>
> I realize that this is all a bit irregular, but this is a broadly useful
> patch, and it really *should* work. I can't see how to get information
> about what's going on without checking the patch, given your diligent
> testing, and the lack of response to your request-for-testing.
OK, I'll apply with this ChangeLog:
gcc:
* config/elfos.h (MAKE_DECL_ONE_ONLY): Redefined to stop DECL_WEAK
from being used for symbols with vague linkage when
HAVE_GAS_COMDAT_GROUP is true.
java:
* decl.c (finish_method): Give methods once-only linkage.
More information about the Java-patches
mailing list