public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 00/15] Binutils/gas/ld port for PRU
@ 2016-12-27 20:44 Dimitar Dimitrov
  2016-12-27 20:44 ` [PATCH v2 03/15] PRU GAS Port Dimitar Dimitrov
                   ` (15 more replies)
  0 siblings, 16 replies; 19+ messages in thread
From: Dimitar Dimitrov @ 2016-12-27 20:44 UTC (permalink / raw)
  To: binutils; +Cc: Dimitar Dimitrov

I hope I have addressed all comments from the initial submission. Biggest change
 in v2 is the major rework of relocations to make the GNU PRU port compatible with TI's proprietary toolchain ELF format. I still have not implemented TI's debug info relocations, but they may come as another patch in the future.

My TI PRU ELF reverse-engineering notes are here: https://github.com/dinuxbg/gnupru/wiki .

I have also used a simple sanity check test to ensure that GNU LD can link TI CLPRU object files: https://github.com/dinuxbg/gnupru/tree/for-next/testing/interop


v2
  - BFD: Removed HI16/LO16 relocations as they were non-standard and not
    supported by the TI proprietary toolchain.
  - BFD: Added LDI32 relocation as supported by the TI proprietary toolchain.
  - AS,BFD: Removed leading symbol underscore in order to be compatible with
    TI's ABI.
  - BFD: Assigned relocation numbers in order to be compatible with
    TI's toolchain.
  - Fixed changelog snippets.
  - Removed auto-generated files from patches.
  - LD: Fix default linker script for 'ld -r'
  - Switch to r3.w2 as return address for the call and ret pseudos. This will
    help keeping the same ABI with TI's C compiler.
  - BFD: Use EM_TI_PRU for ELF machine ID.
  - GAS: Make use of bfd_check_overflow.
  - BFD: Set src_mask=0 because PRU has USE_RELA.
  - BFD: Get rid of unneeded PRU hash.
  - LD: Remove gc-sections flag as we do not support it. Update the testsuite
    accordingly.

v1
  Initial submission: https://sourceware.org/ml/binutils/2016-12/msg00066.html


Dimitar Dimitrov (15):
  PRU BFD support
  PRU Binutils port
  PRU GAS Port
  PRU LD Port
  PRU Opcode Port
  Add PRU ELF ID to elfcpp
  ld: testsuite: Mark PRU as elf target that does not support shared
    libraries
  ld: testsuite: Mark sec64k case as too big for PRU
  ld: testsuite: Fix srec test setup for PRU
  gas: testsuite: Mark lns-common-1-alt variant for PRU
  ld: testsuite: PRU assembler does not support diff expressions mixing
    data and text labels.
  ld: testsuite: PRU LD does not support arbitrary .text base addresses.
  ld: testsuite: Disable endsym test case
  ld: testsuite: Sanitize output from ld
  ld: testsuite: Mark --gc-sections as unsupported for PRU

 bfd/Makefile.am                          |    4 +
 bfd/archures.c                           |    4 +
 bfd/config.bfd                           |    6 +
 bfd/configure.ac                         |    1 +
 bfd/cpu-pru.c                            |   43 +
 bfd/elf-bfd.h                            |    1 +
 bfd/elf32-pru.c                          | 1469 ++++++++++++++++++++++
 bfd/reloc.c                              |   48 +
 bfd/targets.c                            |    3 +
 binutils/readelf.c                       |   16 +
 elfcpp/elfcpp.h                          |    1 +
 gas/Makefile.am                          |    2 +
 gas/NEWS                                 |    2 +
 gas/config/obj-elf.c                     |    4 +
 gas/config/tc-pru.c                      | 1946 ++++++++++++++++++++++++++++++
 gas/config/tc-pru.h                      |  154 +++
 gas/configure.tgt                        |    2 +
 gas/doc/Makefile.am                      |    1 +
 gas/doc/all.texi                         |    1 +
 gas/doc/as.texinfo                       |   32 +
 gas/doc/c-pru.texi                       |  150 +++
 gas/testsuite/gas/lns/lns.exp            |    1 +
 gas/testsuite/gas/pru/alu.d              |   32 +
 gas/testsuite/gas/pru/alu.s              |   30 +
 gas/testsuite/gas/pru/branch.d           |   63 +
 gas/testsuite/gas/pru/branch.s           |   42 +
 gas/testsuite/gas/pru/illegal.l          |    5 +
 gas/testsuite/gas/pru/illegal.s          |   11 +
 gas/testsuite/gas/pru/ldi.d              |   17 +
 gas/testsuite/gas/pru/ldi.s              |    9 +
 gas/testsuite/gas/pru/ldst.d             |   33 +
 gas/testsuite/gas/pru/ldst.s             |   37 +
 gas/testsuite/gas/pru/loop.d             |   15 +
 gas/testsuite/gas/pru/loop.s             |   10 +
 gas/testsuite/gas/pru/misc.d             |   12 +
 gas/testsuite/gas/pru/misc.s             |    6 +
 gas/testsuite/gas/pru/pru.exp            |   26 +
 gas/testsuite/gas/pru/pseudo.d           |   15 +
 gas/testsuite/gas/pru/pseudo.s           |   10 +
 gas/testsuite/gas/pru/warn_reglabel.l    |    3 +
 gas/testsuite/gas/pru/warn_reglabel.s    |    6 +
 gas/testsuite/gas/pru/xfr.d              |   44 +
 gas/testsuite/gas/pru/xfr.s              |   52 +
 include/dis-asm.h                        |    1 +
 include/elf/common.h                     |    2 +-
 include/elf/pru.h                        |   55 +
 include/opcode/pru.h                     |  411 +++++++
 ld/Makefile.am                           |    6 +
 ld/NEWS                                  |    2 +
 ld/configure.tgt                         |    1 +
 ld/emulparams/pruelf.sh                  |   19 +
 ld/emultempl/pruelf.em                   |   50 +
 ld/scripttempl/pru.sc                    |  179 +++
 ld/testsuite/ld-elf/eh-frame-hdr.d       |    2 +-
 ld/testsuite/ld-elf/endsym.d             |    1 +
 ld/testsuite/ld-elf/group8a.d            |    2 +-
 ld/testsuite/ld-elf/group8b.d            |    2 +-
 ld/testsuite/ld-elf/group9a.d            |    2 +-
 ld/testsuite/ld-elf/group9b.d            |    2 +-
 ld/testsuite/ld-elf/merge.d              |    2 +-
 ld/testsuite/ld-elf/pr12851.d            |    2 +-
 ld/testsuite/ld-elf/pr14926.d            |    2 +-
 ld/testsuite/ld-elf/sec-to-seg.exp       |    1 +
 ld/testsuite/ld-elf/sec64k.exp           |    3 +-
 ld/testsuite/ld-pru/emit-relocs-1.d      |   37 +
 ld/testsuite/ld-pru/emit-relocs-1.ld     |   20 +
 ld/testsuite/ld-pru/emit-relocs-1a.s     |   24 +
 ld/testsuite/ld-pru/emit-relocs-1b.s     |   18 +
 ld/testsuite/ld-pru/ldi32.d              |   12 +
 ld/testsuite/ld-pru/ldi32.s              |    6 +
 ld/testsuite/ld-pru/ldi32_symbol.s       |    3 +
 ld/testsuite/ld-pru/norelax_ldi32-data.d |   20 +
 ld/testsuite/ld-pru/norelax_ldi32-dis.d  |   29 +
 ld/testsuite/ld-pru/pcrel_s10.d          |   18 +
 ld/testsuite/ld-pru/pcrel_s10.s          |    8 +
 ld/testsuite/ld-pru/pcrel_s10_label.s    |    9 +
 ld/testsuite/ld-pru/pcrel_u8-illegal.d   |    7 +
 ld/testsuite/ld-pru/pcrel_u8-illegal.s   |   10 +
 ld/testsuite/ld-pru/pcrel_u8-illegal2.d  |    7 +
 ld/testsuite/ld-pru/pcrel_u8-illegal2.s  |    7 +
 ld/testsuite/ld-pru/pcrel_u8-illegal3.d  |    7 +
 ld/testsuite/ld-pru/pcrel_u8-illegal3.s  |    7 +
 ld/testsuite/ld-pru/pcrel_u8.d           |   15 +
 ld/testsuite/ld-pru/pcrel_u8.s           |   10 +
 ld/testsuite/ld-pru/pcrel_u8_label.s     |    4 +
 ld/testsuite/ld-pru/pmem.d               |   15 +
 ld/testsuite/ld-pru/pmem.s               |   15 +
 ld/testsuite/ld-pru/pmem_symbol.s        |   15 +
 ld/testsuite/ld-pru/pru.exp              |    9 +
 ld/testsuite/ld-pru/relax_ldi32-data.d   |   19 +
 ld/testsuite/ld-pru/relax_ldi32-dis.d    |   27 +
 ld/testsuite/ld-pru/relax_ldi32.s        |   30 +
 ld/testsuite/ld-pru/relax_ldi32_symbol.s |    6 +
 ld/testsuite/ld-pru/reloc.d              |   14 +
 ld/testsuite/ld-pru/reloc.s              |    9 +
 ld/testsuite/ld-pru/reloc_symbol.s       |   25 +
 ld/testsuite/ld-pru/u16.d                |   11 +
 ld/testsuite/ld-pru/u16.s                |    4 +
 ld/testsuite/ld-pru/u16_symbol.s         |    3 +
 ld/testsuite/ld-srec/srec.exp            |    5 +
 ld/testsuite/lib/ld-lib.exp              |    8 +-
 opcodes/Makefile.am                      |    2 +
 opcodes/configure.ac                     |    1 +
 opcodes/disassemble.c                    |    7 +-
 opcodes/pru-dis.c                        |  286 +++++
 opcodes/pru-opc.c                        |  236 ++++
 106 files changed, 6127 insertions(+), 14 deletions(-)
 create mode 100644 bfd/cpu-pru.c
 create mode 100644 bfd/elf32-pru.c
 create mode 100644 gas/config/tc-pru.c
 create mode 100644 gas/config/tc-pru.h
 create mode 100644 gas/doc/c-pru.texi
 create mode 100644 gas/testsuite/gas/pru/alu.d
 create mode 100644 gas/testsuite/gas/pru/alu.s
 create mode 100644 gas/testsuite/gas/pru/branch.d
 create mode 100644 gas/testsuite/gas/pru/branch.s
 create mode 100644 gas/testsuite/gas/pru/illegal.l
 create mode 100644 gas/testsuite/gas/pru/illegal.s
 create mode 100644 gas/testsuite/gas/pru/ldi.d
 create mode 100644 gas/testsuite/gas/pru/ldi.s
 create mode 100644 gas/testsuite/gas/pru/ldst.d
 create mode 100644 gas/testsuite/gas/pru/ldst.s
 create mode 100644 gas/testsuite/gas/pru/loop.d
 create mode 100644 gas/testsuite/gas/pru/loop.s
 create mode 100644 gas/testsuite/gas/pru/misc.d
 create mode 100644 gas/testsuite/gas/pru/misc.s
 create mode 100644 gas/testsuite/gas/pru/pru.exp
 create mode 100644 gas/testsuite/gas/pru/pseudo.d
 create mode 100644 gas/testsuite/gas/pru/pseudo.s
 create mode 100644 gas/testsuite/gas/pru/warn_reglabel.l
 create mode 100644 gas/testsuite/gas/pru/warn_reglabel.s
 create mode 100644 gas/testsuite/gas/pru/xfr.d
 create mode 100644 gas/testsuite/gas/pru/xfr.s
 create mode 100644 include/elf/pru.h
 create mode 100644 include/opcode/pru.h
 create mode 100644 ld/emulparams/pruelf.sh
 create mode 100644 ld/emultempl/pruelf.em
 create mode 100644 ld/scripttempl/pru.sc
 create mode 100644 ld/testsuite/ld-pru/emit-relocs-1.d
 create mode 100644 ld/testsuite/ld-pru/emit-relocs-1.ld
 create mode 100644 ld/testsuite/ld-pru/emit-relocs-1a.s
 create mode 100644 ld/testsuite/ld-pru/emit-relocs-1b.s
 create mode 100644 ld/testsuite/ld-pru/ldi32.d
 create mode 100644 ld/testsuite/ld-pru/ldi32.s
 create mode 100644 ld/testsuite/ld-pru/ldi32_symbol.s
 create mode 100644 ld/testsuite/ld-pru/norelax_ldi32-data.d
 create mode 100644 ld/testsuite/ld-pru/norelax_ldi32-dis.d
 create mode 100644 ld/testsuite/ld-pru/pcrel_s10.d
 create mode 100644 ld/testsuite/ld-pru/pcrel_s10.s
 create mode 100644 ld/testsuite/ld-pru/pcrel_s10_label.s
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8-illegal.d
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8-illegal.s
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8-illegal2.d
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8-illegal2.s
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8-illegal3.d
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8-illegal3.s
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8.d
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8.s
 create mode 100644 ld/testsuite/ld-pru/pcrel_u8_label.s
 create mode 100644 ld/testsuite/ld-pru/pmem.d
 create mode 100644 ld/testsuite/ld-pru/pmem.s
 create mode 100644 ld/testsuite/ld-pru/pmem_symbol.s
 create mode 100644 ld/testsuite/ld-pru/pru.exp
 create mode 100644 ld/testsuite/ld-pru/relax_ldi32-data.d
 create mode 100644 ld/testsuite/ld-pru/relax_ldi32-dis.d
 create mode 100644 ld/testsuite/ld-pru/relax_ldi32.s
 create mode 100644 ld/testsuite/ld-pru/relax_ldi32_symbol.s
 create mode 100644 ld/testsuite/ld-pru/reloc.d
 create mode 100644 ld/testsuite/ld-pru/reloc.s
 create mode 100644 ld/testsuite/ld-pru/reloc_symbol.s
 create mode 100644 ld/testsuite/ld-pru/u16.d
 create mode 100644 ld/testsuite/ld-pru/u16.s
 create mode 100644 ld/testsuite/ld-pru/u16_symbol.s
 create mode 100644 opcodes/pru-dis.c
 create mode 100644 opcodes/pru-opc.c

-- 
2.11.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2016-12-30 10:09 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 20:44 [PATCH v2 00/15] Binutils/gas/ld port for PRU Dimitar Dimitrov
2016-12-27 20:44 ` [PATCH v2 03/15] PRU GAS Port Dimitar Dimitrov
2016-12-27 20:44 ` [PATCH v2 13/15] ld: testsuite: Disable endsym test case Dimitar Dimitrov
2016-12-27 20:44 ` [PATCH v2 02/15] PRU Binutils port Dimitar Dimitrov
2016-12-27 20:44 ` [PATCH v2 09/15] ld: testsuite: Fix srec test setup for PRU Dimitar Dimitrov
2016-12-27 20:44 ` [PATCH v2 01/15] PRU BFD support Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 08/15] ld: testsuite: Mark sec64k case as too big for PRU Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 12/15] ld: testsuite: PRU LD does not support arbitrary .text base addresses Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 06/15] Add PRU ELF ID to elfcpp Dimitar Dimitrov
2016-12-27 23:21   ` Cary Coutant
2016-12-27 20:45 ` [PATCH v2 15/15] ld: testsuite: Mark --gc-sections as unsupported for PRU Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 11/15] ld: testsuite: PRU assembler does not support diff expressions mixing data and text labels Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 04/15] PRU LD Port Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 10/15] gas: testsuite: Mark lns-common-1-alt variant for PRU Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 14/15] ld: testsuite: Sanitize output from ld Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 07/15] ld: testsuite: Mark PRU as elf target that does not support shared libraries Dimitar Dimitrov
2016-12-27 20:45 ` [PATCH v2 05/15] PRU Opcode Port Dimitar Dimitrov
2016-12-30  4:36 ` [PATCH v2 00/15] Binutils/gas/ld port for PRU Alan Modra
2016-12-30 10:09   ` Dimitar Dimitrov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).