Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion Should weak hidden undefined symbol be allowed?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Daniel Jacobowitz  
View profile  
 More options Feb 25 2008, 8:55 am
From: Daniel Jacobowitz <Daniel.Jacobow...@gmail.com>
Date: Mon, 25 Feb 2008 05:55:02 -0800 (PST)
Local: Mon, Feb 25 2008 8:55 am
Subject: Re: Should weak hidden undefined symbol be allowed?
On Feb 25, 12:32 am, "H.J." <hjl.to...@gmail.com> wrote:

> For

> foo ? foo() : puts( "foo == null, skipped." );

> if foo is hidden, compiler assumes it will be defined in the same
> component. On
> x86-64, compiler may generate the following PIC code

>         leaq    foo(%rip), %rax
>         testq   %rax, %rax

> PC relative address is used here. It will work correctly if foo is
> defined in
> the same component.

As I've said earlier on the binutils list, if the symbol is weak, the
above seems to me to be a compiler bug.

> Generate a DSO with DT_TEXTREL isn't very desirable. We want
> to avoid it if possible. It is odd to tell compiler that you can't
> always
> assume a hidden symbol will be defined in the same component
> when you access it.

No stranger than telling it that the address of a weak symbol can be
NULL.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.