[PATCH] D13232: ELF2: Add basic linker script support.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 19:48:23 PDT 2015


ruiu created this revision.
ruiu added a reviewer: rafael.
ruiu added a subscriber: llvm-commits.

This linker script parser and evaluator is powerful enough to read
Linux's libc.so, which is (despite its name) a linker script that
contains OUTPUT_FORMAT, GROUP and AS_NEEDED directives.

The parser implemented in this patch is a recursive-descendent one.
It does *not* construct an AST but consumes directives in place and
sets the results to the Config object, like Driver is doing. This
should be very fast since less objects are allocated, and this is
also more readable.

http://reviews.llvm.org/D13232

Files:
  ELF/Config.h
  ELF/Driver.cpp
  ELF/Driver.h
  ELF/DriverUtils.cpp
  test/elf2/basic.s
  test/elf2/invalid-elf.test
  test/elf2/linkerscript.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13232.35934.patch
Type: text/x-patch
Size: 8496 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150929/35972199/attachment.bin>


More information about the llvm-commits mailing list