public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yoshinori Sato <ysato@users.sourceforge.jp>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org
Subject: Re: [PATCH v8 01/17] h8300: Assembly headers.
Date: Tue, 21 Apr 2015 17:28:14 +0900	[thread overview]
Message-ID: <87bnihvqap.wl-ysato@users.sourceforge.jp> (raw)
In-Reply-To: <20150420074446.GC3870@distanz.ch>

At Mon, 20 Apr 2015 09:44:46 +0200,
Tobias Klauser wrote:
> 
> On 2015-04-20 at 08:13:17 +0200, Yoshinori Sato <ysato@users.sourceforge.jp> wrote:
> [...]
> > diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h
> > new file mode 100644
> > index 0000000..09031d0
> > --- /dev/null
> > +++ b/arch/h8300/include/asm/elf.h
> > @@ -0,0 +1,101 @@
> > +#ifndef __ASM_H8300_ELF_H
> > +#define __ASM_H8300_ELF_H
> > +
> > +/*
> > + * ELF register definitions..
> > + */
> > +
> > +#include <asm/ptrace.h>
> > +#include <asm/user.h>
> > +
> > +typedef unsigned long elf_greg_t;
> > +
> > +#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
> > +typedef elf_greg_t elf_gregset_t[ELF_NGREG];
> > +typedef unsigned long elf_fpregset_t;
> > +
> > +/*
> > + * This is used to ensure we don't load something for the wrong architecture.
> > + */
> > +#define elf_check_arch(x) ((x)->e_machine == EM_H8_300)
> 
> EM_H8_300 is used here but only introduced in patch 15/17. Please change
> the order of the patches such that the patch adding EM_H8_300 comes
> before the ones using it.

OK.
I will changes order next time.

> > +
> > +/*
> > + * These are used to set parameters in the core dumps.
> > + */
> > +#define ELF_CLASS	ELFCLASS32
> > +#define ELF_DATA	ELFDATA2MSB
> > +#define ELF_ARCH	EM_H8_300
> 
> It's used here again.
> 
> > +#if defined(CONFIG_CPU_H8300H)
> > +#define ELF_CORE_EFLAGS 0x810000
> > +#endif
> > +#if defined(CONFIG_CPU_H8S)
> > +#define ELF_CORE_EFLAGS 0x820000
> > +#endif
> > +
> > +#define ELF_PLAT_INIT(_r) do { (_r)->er1 = 0; } while (0)
> > +
> > +#define ELF_EXEC_PAGESIZE	4096
> > +
> > +/* This is the location that an ET_DYN program is loaded if exec'ed.  Typical
> > +   use of this is to invoke "./ld.so someprog" to test out a new version of
> > +   the loader.  We need to make sure that it is out of the way of the program
> > +   that it will "exec", and that there is sufficient room for the brk.  */
> > +
> > +#define ELF_ET_DYN_BASE         0xD0000000UL
> > +
> > +/* This yields a mask that user programs can use to figure out what
> > +   instruction set this cpu supports.  */
> > +
> > +#define ELF_HWCAP	(0)
> > +
> > +/* This yields a string that ld.so will use to load implementation
> > +   specific libraries for optimization.  This is more specific in
> > +   intent than poking at uname or /proc/cpuinfo.  */
> > +
> > +#define ELF_PLATFORM  (NULL)
> > +
> > +#define R_H8_NONE       0
> > +#define R_H8_DIR32      1
> > +#define R_H8_DIR32_28   2
> > +#define R_H8_DIR32_24   3
> > +#define R_H8_DIR32_16   4
> > +#define R_H8_DIR32U     6
> > +#define R_H8_DIR32U_28  7
> > +#define R_H8_DIR32U_24  8
> > +#define R_H8_DIR32U_20  9
> > +#define R_H8_DIR32U_16 10
> > +#define R_H8_DIR24     11
> > +#define R_H8_DIR24_20  12
> > +#define R_H8_DIR24_16  13
> > +#define R_H8_DIR24U    14
> > +#define R_H8_DIR24U_20 15
> > +#define R_H8_DIR24U_16 16
> > +#define R_H8_DIR16     17
> > +#define R_H8_DIR16U    18
> > +#define R_H8_DIR16S_32 19
> > +#define R_H8_DIR16S_28 20
> > +#define R_H8_DIR16S_24 21
> > +#define R_H8_DIR16S_20 22
> > +#define R_H8_DIR16S    23
> > +#define R_H8_DIR8      24
> > +#define R_H8_DIR8U     25
> > +#define R_H8_DIR8Z_32  26
> > +#define R_H8_DIR8Z_28  27
> > +#define R_H8_DIR8Z_24  28
> > +#define R_H8_DIR8Z_20  29
> > +#define R_H8_DIR8Z_16  30
> > +#define R_H8_PCREL16   31
> > +#define R_H8_PCREL8    32
> > +#define R_H8_BPOS      33
> > +#define R_H8_PCREL32   34
> > +#define R_H8_GOT32O    35
> > +#define R_H8_GOT16O    36
> > +#define R_H8_DIR16A8   59
> > +#define R_H8_DIR16R8   60
> > +#define R_H8_DIR24A8   61
> > +#define R_H8_DIR24R8   62
> > +#define R_H8_DIR32A16  63
> > +#define R_H8_ABS32     65
> > +#define R_H8_ABS32A16 127
> > +
> > +#endif
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Yoshinori Sato
<ysato@users.sourceforge.jp>

  reply	other threads:[~2015-04-21  8:28 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-20  6:13 [PATCH v8 00/17] Re-introduce h8300 architecture Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 01/17] h8300: Assembly headers Yoshinori Sato
2015-04-20  7:17   ` Richard Weinberger
2015-04-20  7:47     ` Stephen Rothwell
2015-04-20  7:54       ` Richard Weinberger
2015-04-21  6:50     ` Yoshinori Sato
2015-04-20  7:44   ` Tobias Klauser
2015-04-21  8:28     ` Yoshinori Sato [this message]
2015-04-20 14:00   ` Tobias Klauser
2015-04-21  8:32     ` Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 02/17] h8300: UAPI headers Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 03/17] h8300: Exception and Interrupt handling Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 04/17] h8300: kernel booting Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 05/17] h8300: process and signals Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 06/17] h8300: CPU depend helpers Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 07/17] h8300: miscellaneous functions Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 08/17] h8300: Memory management Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 09/17] h8300: library functions Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 10/17] h8300: Build scripts Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 11/17] h8300: clock driver Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 12/17] h8300: clocksource Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 13/17] h8300: configs Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 14/17] serial: Add H8300 Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 15/17] Add ELF machine Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 16/17] mksysmap: Add h8300 local symbol pattern Yoshinori Sato
2015-04-20  6:13 ` [PATCH v8 17/17] Add H8/300 entry Yoshinori Sato

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=87bnihvqap.wl-ysato@users.sourceforge.jp \
    --to=ysato@users.sourceforge.jp \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /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