This is the mail archive of the
mailing list for the glibc project.
Re: sh4 fails on check-textrel in glibc-2.3.2 even though there areno relocations?
- From: Roland McGrath <roland at redhat dot com>
- To: Dan Kegel <dank at kegel dot com>
- Cc: GNU C Library <libc-alpha at sources dot redhat dot com>
- Date: Thu, 31 Jul 2003 15:44:59 -0700
- Subject: Re: sh4 fails on check-textrel in glibc-2.3.2 even though there areno relocations?
> --- src/bfd/elf32-sh.c.old Fri Jul 25 14:46:58 2003
> +++ src/bfd/elf32-sh.c Thu Jul 31 21:09:38 2003
> @@ -6497,8 +6497,10 @@ sh_elf_check_relocs (bfd *abfd, struct b
> sreloc, 2))
> return FALSE;
> +#if 0
> if (sec->flags & SEC_READONLY)
> info->flags |= DF_TEXTREL;
> elf_section_data (sec)->sreloc = sreloc;
That sure looks to me like it disables emitting DT_TEXTREL completely.
That cannot be right unless ld refuses to emit relocs in readonly segments.
> Er, I guess that means looking at the output of readelf -r
> but it'd take a while for me to figure that out. (Maybe
> check-textrel should output more descriptive errors.)
No, it does a very simple check. You need to understand at least a little
bit about relocation to work on this kind of bug, and you are the person
working on it. All you need to look at is the addresses the relocations
apply to (the first column), and look at the segments (readelf -l) to see
where these addresses lie.