This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/84553] -rdynamic generates TEXTREL relocations on ia64


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84553

--- Comment #4 from James Clarke <jrtc27 at jrtc27 dot com> ---
(In reply to Jim Wilson from comment #2)
> rdynamic is a linker option that the compiler ignores, except to pass on to
> the linker.  As far as the compiler knows, you are building a non-pic
> application, and hence the symbol is local.  We can't assume that -rdynamic
> will be used at compile time, and hence to make this work we must assume
> that any local symbol might become global at link time.

Ah I see, that explains it.

> We can fix this my modifying the ia64_reloc_rw_mask function to return 3
> when non-pic, same as it does when pic, to indicate that local symbols with
> relocs aren't read-only.
> 
> I don't have access to ia64 hardware, so I don't have any easy way to test
> this.
> The symbol ends up in .data.rel.ro.local instead of .data.rel.ro, but
> presumably that is OK.

That's what happens on hppa which has similar function descriptor behaviour, so
that should be fine.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]