From: Richard Mortimer <richm@oldelvet.org.uk>
To: David Miller <davem@davemloft.net>
Cc: richm@oldelvet.org.uk, 609371@bugs.debian.org,
ben@decadent.org.uk, sparclinux@vger.kernel.org,
linux-kernel@vger.kernel.org, rostedt@goodmis.org,
fweisbec@gmail.com, mingo@redhat.com, Jesper.Nilsson@axis.com,
jeffm@suse.com
Subject: Re: R_SPARC_13
Date: Tue, 18 Jan 2011 13:23:14 +0000 [thread overview]
Message-ID: <1295356994.20446.3.camel@duncow> (raw)
In-Reply-To: <4D3570D7.2090000@oldelvet.org.uk>
On Tue, 2011-01-18 at 10:52 +0000, Richard Mortimer wrote:
>
> On 18/01/2011 06:50, David Miller wrote:
> > From: David Miller<davem@davemloft.net>
> > Date: Mon, 17 Jan 2011 16:37:09 -0800 (PST)
> >
> >> So we do end up seeing the R_SPARC_LO10 + R_SPARC_13 sequences in the
> >> final module object.
> >>
> >> Therefore, we really should handle R_SPARC_13 in the sparc module loader.
> >
> > Ok, I now feel like I'm hallucinating.
> >
> > davem@sunset:~/src/GIT/linux-2.6-stable$ uname -a
> > Linux sunset 2.6.37 #1 SMP Wed Jan 12 20:14:59 PST 2011 sparc64 GNU/Linux
> > davem@sunset:~/src/GIT/linux-2.6-stable$ objdump --reloc /lib/modules/2.6.37/kernel/net/ipv6/ipv6.ko | grep R_SPARC_13
> > 0000000000000c7c R_SPARC_13 *ABS*+0x0000000000000004
> > 0000000000001ae4 R_SPARC_13 *ABS*+0x0000000000000018
> > 0000000000001b0c R_SPARC_13 *ABS*+0x0000000000000008
> > ...
> > davem@sunset:~/src/GIT/linux-2.6-stable$ lsmod | grep ipv6
> > ipv6 240422 12
> > davem@sunset:~/src/GIT/linux-2.6-stable$
> >
> > I must be missing something obvious.
> >
>
> I think objdump may be distorting the truth a little. I found the
> following in binutils gas/config/tc-sparc.c tc-gen_reloc(). I wonder if
> it is displaying rewritten records rather than displaying the raw
> contents. I haven't traced it through the code but the fact that it is
> obviously working for you means that something like this is going on.
>
> /* We expand R_SPARC_OLO10 to R_SPARC_LO10 and R_SPARC_13
> on the same location. */
> if (code == BFD_RELOC_SPARC_OLO10)
> {
> relocs[1] = reloc = (arelent *) xmalloc (sizeof (arelent));
> relocs[2] = NULL;
>
> reloc->sym_ptr_ptr = (asymbol **) xmalloc (sizeof (asymbol *));
> *reloc->sym_ptr_ptr
> = symbol_get_bfdsym (section_symbol (absolute_section));
> reloc->address = fixp->fx_frag->fr_address + fixp->fx_where;
> reloc->howto = bfd_reloc_type_lookup (stdoutput, BFD_RELOC_SPARC13);
> reloc->addend = fixp->tc_fix_data;
> }
>
Dave,
To close this off as a non-issue as far as my boot failures are
concerned I did some further checking and objdump is displaying
R_SPARC_OLO10 as two separate entries. I checked the scsi_mod.ko binary
and found the appropriate Elf64_Rela entry. That has 0x21 as the LSB of
r_info and that is the proper code for R_SPARC_OLO10 which is what you
expected in the first place!
objdump displays
0000000000001618 R_SPARC_LO10 __tracepoint_module_get
0000000000001618 R_SPARC_13 *ABS*+0x0000000000000008
The binary contains
0505140 00 00 00 00 00 00 16 18 00 00 04 0b 00 00 08 21
^^
0505160 00 00 00 00 00 00 00 00
which corresponds to
typedef struct elf64_rela {
Elf64_Addr r_offset; /* Location at which to apply the action */
Elf64_Xword r_info; /* index and type of relocation */
Elf64_Sxword r_addend; /* Constant addend used to compute value */
} Elf64_Rela;
Regards
Richard
> I will try your alignment patch without any R_SPARC_13 related changes
> and see how that goes.
>
> Regards
>
> Richard
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-01-18 13:23 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110113.155700.102679408.davem@davemloft.net>
[not found] ` <4D302B2F.7030108@oldelvet.org.uk>
[not found] ` <4D3074FE.3030707@oldelvet.org.uk>
2011-01-16 5:17 ` Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36 David Miller
2011-01-16 14:17 ` Richard Mortimer
2011-01-16 19:39 ` David Miller
2011-01-17 14:11 ` Steven Rostedt
2011-01-17 14:37 ` Bastian Blank
2011-01-17 19:35 ` Mathieu Desnoyers
2011-01-18 6:36 ` David Miller
2011-01-18 5:34 ` David Miller
2011-01-18 6:00 ` David Miller
2011-01-18 6:08 ` David Miller
2011-01-18 16:46 ` Mathieu Desnoyers
2011-01-18 17:33 ` Steven Rostedt
2011-01-18 18:16 ` Steven Rostedt
2011-01-18 18:26 ` Steven Rostedt
2011-01-18 20:13 ` Mathieu Desnoyers
2011-01-18 20:22 ` Steven Rostedt
2011-01-19 5:08 ` Mathieu Desnoyers
2011-01-19 5:16 ` David Miller
2011-01-19 15:10 ` Mathieu Desnoyers
2011-01-19 16:14 ` Sam Ravnborg
2011-01-19 16:18 ` Mathieu Desnoyers
2011-01-19 6:32 ` David Miller
2011-01-19 7:20 ` David Miller
2011-01-19 15:33 ` Mathieu Desnoyers
2011-01-19 21:40 ` David Miller
2011-01-19 22:00 ` Steven Rostedt
2011-01-19 22:09 ` David Miller
2011-01-19 22:21 ` Mathieu Desnoyers
2011-01-19 22:23 ` David Miller
2011-01-19 22:32 ` Sam Ravnborg
2011-01-19 22:34 ` Mathieu Desnoyers
2011-01-19 22:13 ` Mathieu Desnoyers
2011-01-19 22:21 ` David Miller
2011-01-19 22:33 ` Mathieu Desnoyers
2011-01-20 0:41 ` David Miller
2011-01-21 0:04 ` Mathieu Desnoyers
2011-01-21 18:06 ` Richard Mortimer
2011-01-21 18:52 ` Mathieu Desnoyers
2011-01-21 19:15 ` Mathieu Desnoyers
2011-01-21 20:14 ` Richard Mortimer
2011-01-21 20:40 ` Mathieu Desnoyers
2011-01-21 22:50 ` Richard Mortimer
2011-01-22 18:42 ` Richard Mortimer
2011-01-22 18:53 ` Mathieu Desnoyers
2011-01-19 15:46 ` Steven Rostedt
2011-01-19 16:15 ` Mathieu Desnoyers
2011-01-19 18:13 ` Steven Rostedt
2011-01-19 18:20 ` Mathieu Desnoyers
2011-01-19 21:44 ` David Miller
2011-01-19 22:15 ` Mathieu Desnoyers
2011-01-19 22:22 ` David Miller
2011-01-19 15:11 ` Mathieu Desnoyers
2011-01-19 15:27 ` Richard Mortimer
2011-01-17 6:07 ` David Miller
2011-01-17 9:05 ` Jesper Nilsson
2011-02-01 5:11 ` David Miller
2011-02-01 10:03 ` Jesper Nilsson
2011-01-17 10:22 ` Richard Mortimer
2011-01-17 14:15 ` Steven Rostedt
2011-01-18 6:35 ` David Miller
2011-01-18 17:30 ` Steven Rostedt
2011-01-17 19:46 ` R_SPARC_13 (Re: Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36) Richard Mortimer
2011-01-17 21:02 ` R_SPARC_13 David Miller
2011-01-17 23:34 ` R_SPARC_13 Richard Mortimer
2011-01-18 0:18 ` R_SPARC_13 David Miller
2011-01-18 0:37 ` R_SPARC_13 David Miller
2011-01-18 1:28 ` R_SPARC_13 Richard Mortimer
2011-01-18 6:50 ` R_SPARC_13 David Miller
2011-01-18 10:52 ` R_SPARC_13 Richard Mortimer
2011-01-18 13:23 ` Richard Mortimer [this message]
2011-01-18 21:00 ` R_SPARC_13 David Miller
2011-01-19 4:12 ` R_SPARC_13 David Miller
2011-01-17 14:39 ` Bug#609371: linux-image-2.6.37-trunk-sparc64: module scsi_mod: Unknown relocation: 36 Bernhard R. Link
2011-01-18 5:24 ` David Miller
2011-01-18 9:26 ` Jesper Nilsson
2011-01-18 6:27 ` David Miller
2011-01-18 17:05 ` Steven Rostedt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1295356994.20446.3.camel@duncow \
--to=richm@oldelvet.org.uk \
--cc=609371@bugs.debian.org \
--cc=Jesper.Nilsson@axis.com \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=fweisbec@gmail.com \
--cc=jeffm@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rostedt@goodmis.org \
--cc=sparclinux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox