From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Cao jin <caoj.fnst@cn.fujitsu.com>
Cc: kirill.shutemov@linux.intel.com,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
bp@alien8.de, "H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: question about head_64.S
Date: Tue, 22 Jan 2019 16:08:00 +0300 [thread overview]
Message-ID: <20190122130800.cpfor3klov22badb@kshutemo-mobl1> (raw)
In-Reply-To: <023da151-bb1d-1b11-ec1d-01eb675d528f@cn.fujitsu.com>
On Tue, Jan 22, 2019 at 03:31:25PM +0800, Cao jin wrote:
> Hi, Kirll,
>
> On 1/15/19 7:45 PM, Cao jin wrote:
> > Hi,
> > I have been digging into this file for a while, and I still have 2
> > questions unclear, hope to get your help.
> >
>
> >
> > 2.
> > Why gdt64 has following definition?:
> >
> > gdt64:
> > .word gdt_end - gdt
> > .long 0
> > .word 0
> > .quad 0
> >
> > obviously, gdt64 stores the GDTR content under x86_64, which is 10 bytes
> > long, so why not just:
> >
> > gdt64:
> > .word gdt_end - gdt
> > .quad 0
> >
> > With above modification, it can boot.
> >
>
> Seems you introduced gdt64 code in commit beebaccd50, could you help
> with this question?
Looks like you are right. I've got confused at some point.
Could you prepare a patch?
> And it also remind me of another question about adjust_got which is also
> introduced by you. Because I failed to construct a test environment with
> ld version less than 2.24 until now, so I wanna do a quick ask here:
> does it make sense to adjust GOT from the 4th entry of it? Because as I
> know, the first 3 entries are special one, which (I guess) will be not used.
No.
These 3 entries are reserved for a special symbols (like entry 0 for
_DYNAMIC). It means linker should not use these entries for normal
symbols, but it doesn't mean that they don't need to be adjusted during
the load.
--
Kirill A. Shutemov
next prev parent reply other threads:[~2019-01-22 13:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-15 11:45 Cao jin
2019-01-15 15:55 ` Thomas Gleixner
2019-01-16 9:44 ` Cao jin
2019-01-22 7:31 ` Cao jin
2019-01-22 13:08 ` Kirill A. Shutemov [this message]
2019-01-23 4:01 ` Cao jin
2019-01-23 10:03 ` Kirill A. Shutemov
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=20190122130800.cpfor3klov22badb@kshutemo-mobl1 \
--to=kirill@shutemov.name \
--cc=bp@alien8.de \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®