This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/84553] -rdynamic generates TEXTREL relocations on ia64
- From: "jrtc27 at jrtc27 dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Feb 2018 20:40:08 +0000
- Subject: [Bug target/84553] -rdynamic generates TEXTREL relocations on ia64
- Auto-submitted: auto-generated
- References: <bug-84553-4@http.gcc.gnu.org/bugzilla/>
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.