This is the mail archive of the mailing list for the glibc 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]

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;
> +#endif
>                    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.

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