48 lines · plain
1# REQUIRES: aarch64-registered-target2 3# RUN: llvm-mc -assemble -triple=arm64-apple-macos11 -filetype=obj %p/Inputs/macho_sections.s -o %t.o4# RUN: llvm-otool -l %t.o | FileCheck %s --check-prefix=ORIG5 6 7# RUN: llvm-objcopy %t.o --update-section __DATA,__storage=%p/Inputs/macho_sections.s %t.new.o8# RUN: llvm-otool -l %t.new.o | FileCheck %s --check-prefix=UPDATED9 10# ORIG: cmd LC_SEGMENT_6411# ORIG-NEXT: cmdsize 23212# ORIG-NEXT: segname13# ORIG-NEXT: vmaddr 0x000000000000000014# ORIG-NEXT: vmsize 0x00000000000000c015# ORIG-NEXT: fileoff 39216# ORIG-NEXT: filesize 19217# ORIG-NEXT: maxprot 0x0000000718# ORIG-NEXT: initprot 0x0000000719# ORIG-NEXT: nsects 220# ORIG-NEXT: flags 0x021 22# ORIG: Section23# ORIG: sectname __storage24# ORIG-NEXT: segname __DATA25# ORIG-NEXT: addr 0x000000000000004026# ORIG-NEXT: size 0x000000000000008027 28 29### Make sure the file size and segment size have changed30# UPDATED: cmd LC_SEGMENT_6431# UPDATED-NEXT: cmdsize 23232# UPDATED-NEXT: segname33# UPDATED-NEXT: vmaddr 0x000000000000000034# UPDATED-NEXT: vmsize 0x000000000000009035# UPDATED-NEXT: fileoff 39236# UPDATED-NEXT: filesize 14437# UPDATED-NEXT: maxprot 0x0000000738# UPDATED-NEXT: initprot 0x0000000739# UPDATED-NEXT: nsects 240# UPDATED-NEXT: flags 0x041 42# UPDATED: Section43# UPDATED: sectname __storage44# UPDATED-NEXT: segname __DATA45# UPDATED-NEXT: addr 0x000000000000004046# UPDATED-NEXT: size 0x000000000000005047 48