[PATCH] D64130: [LLD][ELF] - Linkerscript: add a support for expressions for section's filling

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 03:22:50 PDT 2019


I'll take a look soon. Thanks for reporting!

Best regards,
George | Developer | Access Softek, Inc

________________________________________
От: Andrew Ng via Phabricator <reviews at reviews.llvm.org>
Отправлено: 5 июля 2019 г. 18:32
Кому: George Rimar; maskray at google.com; peter.smith at arm.com; ruiu at google.com
Копия: anng.sw at gmail.com; peter.smith at linaro.org; emaste at freebsd.org; arichardson.kde at gmail.com; Igor Kudrin; Evgeny Leviant; llvm-commits at lists.llvm.org
Тема: [PATCH] D64130: [LLD][ELF] - Linkerscript: add a support for expressions for section's filling

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.  If you suspect potential phishing or spam email, report it to ReportSpam at accesssoftek.com

andrewng added a comment.

This change breaks if you add `FILL(0x10101010)` before `*(.aaa)` in fill.test:

  # REQUIRES: x86
  # RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %p/Inputs/fill.s -o %t.o
  # RUN: ld.lld -o %t --script %s %t.o
  # RUN: llvm-objdump -s %t | FileCheck %s

  SECTIONS {
    .out : {
     FILL(0x11111111)
     . += 2;
     FILL(0x10101010)
     *(.aaa)
     . += 4;
     *(.bbb)
     . += 4;
     FILL(0x22220000 + 0x2222);
     . += 4;
    }
  }

  # CHECK:      Contents of section .out:
  # CHECK-NEXT: 2222aa22 222222bb 22222222 22222222

That's because the expression for the `FILL` command should be contained **within** the parentheses.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64130/new/

https://reviews.llvm.org/D64130





More information about the llvm-commits mailing list