[llvm] [llvm-objcopy] Add --change-section-address (PR #98664)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 29 02:45:28 PDT 2024


================
@@ -149,26 +132,26 @@
 # CHECK-PARTIAL-OVERLAP:        .anotherone
 # CHECK-PARTIAL-OVERLAP-SAME:                                    0000000000000320
 
-# Overflow by 1
-# RUN: not llvm-objcopy --change-section-address .anotherone+0xfffffffffffffd00 %ti 2>&1 | FileCheck %s --check-prefix=ERR-OVERFLOW
-# Underflow by 1
-# RUN: not llvm-objcopy --change-section-address .text2-0x201 %ti 2>&1 | FileCheck %s --check-prefix=ERR-UNDERFLOW
-# Invalid argument value
-# RUN: not llvm-objcopy --change-section-address 0 %ti 2>&1 | FileCheck %s --check-prefix=ERR-IVALID-VAL
-# Invalid value in argument value
-# RUN: not llvm-objcopy --change-section-address .anotherone+0c50 %ti 2>&1 | FileCheck %s --check-prefix=ERR-NOT-INTEGER
-# Value does not fit in uint64_t
-# RUN  not llvm-objcopy --change-section-address .text1=0x10000000000000000 %ti %to 2>&1 | FileCheck %s --chack-prefix=ERR-NOT-INTEGER
-# Missing section pattern
-# RUN: not llvm-objcopy --change-section-address =0x10 %ti 2>&1 | FileCheck %s --check-prefix=ERR-MISSING-SECTION
-# Missing value after -
-# RUN: not llvm-objcopy --change-section-address .text1- %ti 2>&1 | FileCheck %s --check-prefix=ERR-MISSING-VALUE-MINUS
-# Missing value after +
-# RUN: not llvm-objcopy --change-section-address .text1+ %ti 2>&1 | FileCheck %s --check-prefix=ERR-MISSING-VALUE-PLUS
-# Missing value after =
-# RUN: not llvm-objcopy --change-section-address .text1= %ti 2>&1 | FileCheck %s --check-prefix=ERR-MISSING-VALUE-EQUAL
-# Invalid regex
-# RUN: not llvm-objcopy --regex --change-section-address  "ab**-0x20" %ti 2>&1 | FileCheck %s --check-prefix=ERR-MATCHER-FAILURE
+## Check overflow by 1.
+# RUN: not llvm-objcopy --change-section-address .anotherone+0xfffffffffffffd00 %ti1 2>&1 | FileCheck %s --check-prefix=ERR-OVERFLOW
+## Check underflow by 1.
+# RUN: not llvm-objcopy --change-section-address .text2-0x201 %ti1 2>&1 | FileCheck %s --check-prefix=ERR-UNDERFLOW
+## Check error when argument value is invalid as a whole.
+# RUN: not llvm-objcopy --change-section-address 0 %ti1 2>&1 | FileCheck %s --check-prefix=ERR-IVALID-VAL
+## Check error when the value is invalid in the argument value.
+# RUN: not llvm-objcopy --change-section-address .anotherone+0c50 %ti1 2>&1 | FileCheck %s --check-prefix=ERR-NOT-INTEGER
+## Check error when the value does not fit in uint64_t.
+# RUN  not llvm-objcopy --change-section-address .text1=0x10000000000000000 %ti1 %to 2>&1 | FileCheck %s --chack-prefix=ERR-NOT-INTEGER
+## Check error when the section pattern is missing.
+# RUN: not llvm-objcopy --change-section-address =0x10 %ti1 2>&1 | FileCheck %s --check-prefix=ERR-MISSING-SECTION
+## Check error when the negative adjustment value is missing.
+# RUN: not llvm-objcopy --change-section-address .text1- %ti1 2>&1 | FileCheck %s --check-prefix=ERR-MISSING-VALUE-MINUS
+## Check error when the positive adjustment valu is missing.
----------------
jh7370 wrote:

```suggestion
## Check error when the positive adjustment value is missing.
```

https://github.com/llvm/llvm-project/pull/98664


More information about the llvm-commits mailing list