Wednesday 12 July 2017

Objdump ถอดแยกชิ้นส่วน แขน ไบนารี ตัวเลือก


ฉันสามารถถอดแยกไฟล์ไบนารีแบนโดยใช้ objdump. I m คุ้นเคยกับการถอดไบนารีที่มีโครงสร้างการทำงานเช่นไฟล์ ELF ใช้ แต่ถ้าฉันมีไฟล์ไบนารีแบนที่ฉันรู้ควรจะโหลดที่เช่นที่อยู่ 0xabcd1000 ฉันสามารถ ขอ objdump เพื่อถอดมันฉันพยายามจัดหาตัวเลือกเช่น - เริ่มต้นที่อยู่ 0xabcd1000 แต่ objdump เพียงรัฐที่ doesn t รู้จักรูปแบบฉันมีความคิดอื่น ๆ เกี่ยวกับวิธีการถอดชิ้นส่วนไฟล์ แต่ฉันต้องการทราบว่า objdump สามารถให้ง่าย solution. asked 12 มกราคมที่ 13 21.starblue และ hlovdal ทั้งสองมีส่วนของคำตอบบัญญัติถ้าคุณต้องการถอดดิบรหัส i8086 คุณมักต้องการไวยากรณ์ของ Intel ไม่ไวยากรณ์ AT เกินไปเกินไปใช้ดังนั้นถ้ารหัสของคุณคือ ELF หรือรหัส E หรือคุณสามารถใช้รูปแบบสั้น ๆ สำหรับรหัสแบบ 32 บิตหรือ 64 บิตละเว้นส่วนหัวของ ELF 8086 มีข้อมูลนี้เรียบร้อยแล้วตามที่แนะนำโดย jameslin นอกจากนี้ยังเป็นทางเลือกที่ดี แต่ objdump มักจะมาพร้อมกับ OS และสามารถจัดการกับสถาปัตยกรรมทั้งหมดที่สนับสนุนโดย GN U binutils superset ของผู้ที่ได้รับการสนับสนุนโดย GCC และเอาท์พุทของมันมักจะถูกป้อนเข้าไปใน GNU เนื่องจาก ndisasm มักจะถูกป้อนเข้าไปใน NASM แม้ว่าแน่นอน Peneter Cordes แสดงให้เห็นว่า Agner Fog s objconv ดีมากมันทำให้ฉลากบนเป้าหมาย branch, ทำให้ง่ายขึ้นมากที่จะคิดออกว่ารหัสไม่สามารถจะแยกออกเป็นรูปแบบ NASM, YASM, MASM หรือ AT T GNUMedia มัลติมีเดียแล้วพบเกี่ยวกับ - ปรับ - vma เทียบเท่า ndisasm เป็น - o ตัวเลือกในการถอดแยก, พูดรหัส sh4 ฉันใช้หนึ่งไบนารีจาก Debian เพื่อทดสอบใช้กับ GNU binutils เกือบ disassemblers อื่น ๆ ทั้งหมดจะถูก จำกัด ให้เป็นหนึ่งแพลตฟอร์มเช่น x86 กับ ndisasm และ objconv. The - m เป็นเครื่องและ - EL หมายถึง Little Endian สำหรับ sh4eb ใช้ - EB แทนซึ่งเกี่ยวข้องกับสถาปัตยกรรมที่มีอยู่ใน endianness ใด ๆ ตอบ 22 ธ. ค. 15 ที่ 20 48.objdump แสดงข้อมูลเกี่ยวกับไฟล์อ็อบเจ็กต์อย่างน้อยหนึ่งไฟล์ตัวเลือกจะควบคุมข้อมูลเฉพาะที่จะแสดงข้อมูลนี้เป็นประโยชน์กับผู้เขียนโปรแกรมที่เป็นส่วนใหญ่ เป็น wo rking บนเครื่องมือรวบรวมในทางตรงกันข้ามกับโปรแกรมเมอร์ที่ต้องการเพียงแค่โปรแกรมของพวกเขาเพื่อรวบรวมและ work. objfile เป็นไฟล์วัตถุที่จะตรวจสอบเมื่อคุณระบุที่เก็บไว้ objdump แสดงข้อมูลเกี่ยวกับแต่ละไฟล์วัตถุสมาชิกรูปแบบยาวและสั้นของ ตัวเลือกที่แสดงที่นี่เป็นทางเลือกมีค่าอย่างน้อยหนึ่งตัวเลือกจากรายการ - a, - d, - D, - e, - f, - g, - G, - h, - H, - p, - r, - R - s, - S, - t, - T, - V, - x ต้องได้รับ - a-archive-header หากไฟล์ objfile ใดเป็นที่เก็บถาวรให้แสดงข้อมูลส่วนหัวของที่เก็บถาวรในรูปแบบคล้ายกับ ls - l นอกเหนือจากข้อมูลที่คุณสามารถแสดงรายการด้วย ar tv, objdump - a จะแสดงรูปแบบไฟล์ของวัตถุของสมาชิกถาวรแต่ละตัว - adjust-vma offset เมื่อข้อมูลการทุ่มตลาดก่อนเพิ่มค่าชดเชยให้กับที่อยู่ของส่วนทั้งหมดซึ่งเป็นประโยชน์ถ้าที่อยู่ของส่วนไม่ได้ ตรงกับตารางสัญลักษณ์ซึ่งอาจเกิดขึ้นได้เมื่อวางส่วนไว้ในที่อยู่เฉพาะเมื่อใช้รูปแบบที่ไม่สามารถระบุที่อยู่ของส่วนเช่น b bdname --target bfdname Sp ecify ว่ารูปแบบ object-code สำหรับไฟล์อ็อบเจ็กต์คือ bfdname ตัวเลือกนี้อาจไม่จำเป็นต้อง objdump สามารถรับรู้ข้อมูลรูปแบบต่างๆได้โดยอัตโนมัติ displays ข้อมูลสรุปจากส่วนหัวข้อ - h ของ fu o ซึ่งระบุอย่างชัดเจน - m เป็นไฟล์ VAX object ใน รูปแบบที่ผลิตโดยคอมไพเลอร์ Oasys คุณสามารถแสดงรายการรูปแบบที่มีอยู่ได้ด้วยตัวเลือก - i ดูการเลือกเป้าหมายเพื่อดูข้อมูลเพิ่มเติม - C - แก้ปัญหารูปแบบถอดรหัส demangle ชื่อสัญลักษณ์ระดับต่ำลงในชื่อระดับผู้ใช้นอกจากการลบขีดล่างเริ่มต้นที่ prepended โดยระบบ ทำให้คอมไพเลอร์ต่างๆสามารถอ่านได้คอมไพเลอร์ที่แตกต่างกันมีรูปแบบการบิดเบือนที่แตกต่างกันอาร์กิวเมนต์สไตล์ demangling ที่เป็นตัวเลือกสามารถใช้เพื่อเลือกลักษณะการทำให้พังทลายได้สำหรับคอมไพเลอร์ของคุณดู c filt สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ demangling - g --debugging ข้อมูลการแก้จุดบกพร่องในจอแสดงผล การดีบักข้อมูลที่เก็บไว้ในไฟล์และพิมพ์ออกโดยใช้ไวยากรณ์ C เช่นเฉพาะบางประเภทของข้อมูลการแก้จุดบกพร่องได้ i mplemented ประเภทอื่น ๆ บางอย่างได้รับการสนับสนุนโดย readelf - w ดู readelf - e - debugging-tags เช่น - g แต่ข้อมูลถูกสร้างขึ้นในรูปแบบที่เข้ากันได้กับเครื่องมือ ctags - d --disassemble แสดงเมมโมรี่สติกของ assembler สำหรับคำแนะนำจาก objfile จากเครื่อง ตัวเลือกจะแยกส่วนเท่านั้นส่วนที่คาดว่าจะมีคำสั่ง - D-disassemble-all เช่น - d แต่แยกส่วนเนื้อหาของทุกส่วนไม่ใช่เฉพาะที่คาดว่าจะมีคำแนะนำ --prefix-addresses เมื่อถอดชิ้นส่วนพิมพ์ที่อยู่ที่สมบูรณ์ในแต่ละส่วน line นี่คือรูปแบบ disassembly ที่เก่ากว่า - EB - EL --endian ระบุ endianness ของไฟล์ object ซึ่งจะมีผลเฉพาะกับ disassembly ซึ่งจะเป็นประโยชน์เมื่อทำการถอดประกอบรูปแบบไฟล์ซึ่งไม่ได้ระบุถึงข้อมูล endianness เช่น S-records - f - ส่วนหัวของไฟล์แสดงข้อมูลสรุปจากส่วนหัวโดยรวมของแต่ละไฟล์ objfile --file-start-context ระบุว่าเมื่อแสดงการถอดรหัสซอร์สโค้ดที่ถูกถอดรหัสมาถือว่าเป็น - S จาก fil e ที่ยังไม่ได้แสดงให้ขยายบริบทไปยังจุดเริ่มต้นของไฟล์ - h - section-headers หัวพิมพ์ข้อมูลการแสดงข้อมูลสรุปจากส่วนหัวของไฟล์อ็อบเจ็กต์ส่วนของไฟล์อาจถูกย้ายไปยังที่อยู่ที่ไม่เป็นมาตรฐานตัวอย่างเช่น โดยใช้ตัวเลือก --Text --Tdata หรือ --Tbss เพื่อ ld อย่างไรก็ตามบางรูปแบบแฟ้มวัตถุเช่นไม่เก็บที่อยู่เริ่มต้นของส่วนของแฟ้มในสถานการณ์เหล่านั้นแม้ว่า ld relocates ส่วนถูกต้องโดยใช้ objdump - h เพื่อแสดงรายการ ส่วนหัวส่วนหัวของไฟล์ไม่สามารถแสดงที่อยู่ที่ถูกต้องแทนจะแสดงที่อยู่ตามปกติซึ่งเป็นนัยสำหรับเป้าหมาย - H --help พิมพ์สรุปตัวเลือกเพื่อ objdump และออก - i --info แสดงรายการที่แสดงสถาปัตยกรรมและวัตถุทั้งหมด รูปแบบที่สามารถใช้งานได้กับ - b หรือ - m - j ชื่อ - ชื่อชุดแสดงข้อมูลเฉพาะสำหรับส่วนชื่อ - l --line-numbers ป้ายกำกับการแสดงผลโดยใช้ข้อมูลการดีบักด้วยชื่อไฟล์และหมายเลขบรรทัดอ้างอิงที่ตรงกับรหัสอ็อบเจ็กต์ หรือ relocs ที่แสดงเฉพาะที่มีประโยชน์กับ - d - D หรือ - r - m machine --architecture machine ระบุสถาปัตยกรรมที่จะใช้เมื่อทำการถอดชิ้นส่วนไฟล์สิ่งนี้สามารถเป็นประโยชน์เมื่อทำการถอดชิ้นส่วนวัตถุซึ่งไม่ได้อธิบายถึงข้อมูลสถาปัตยกรรมเช่น S-records You สามารถระบุสถาปัตยกรรมที่พร้อมใช้งานได้ด้วยตัวเลือก i - ตัวเลือก M - ตัวเลือกตัวเลือกย่อย - ส่งผ่านข้อมูลเฉพาะเป้าหมายไปยัง disassembler เฉพาะในบางกลุ่มเป้าหมายเท่านั้นหากจำเป็นต้องระบุตัวเลือก disassembler มากกว่าหนึ่งตัวเลือกสามารถใช้ตัวเลือก - M หลายตัวได้ หรือสามารถวางไว้ด้วยกันในรายการที่คั่นด้วยจุลภาคหากเป้าหมายเป็นสถาปัตยกรรม ARM สวิตช์นี้สามารถใช้เพื่อเลือกชุดชื่อการลงทะเบียนที่ใช้ระหว่างการถอดส่วนกำหนดค่า - M reg-names-std ค่าดีฟอลต์จะเลือกชื่อรีจิสเตอร์เป็น ใช้ในชุดคำสั่ง ARM ของชุดคำสั่ง แต่มี register 13 ชื่อ sp, register 14 เรียก lr และ register 15 ชื่อ pc ระบุ - M reg-names-apcs จะเลือกชุดชื่อที่ใช้โดย ARM P rocedure Call Standard ในขณะที่ระบุ - M reg-name-raw จะใช้ r ตามด้วยหมายเลขทะเบียนนอกจากนี้ยังมีสองตัวแปรในรูปแบบการตั้งชื่อ APCS ที่เปิดใช้งานโดย - M reg-names-atpcs และ - M reg-names - atpcs พิเศษที่ใช้ ARM Thumb Procedure Call มาตรฐานการตั้งชื่ออนุสัญญาทั้งกับชื่อลงทะเบียนปกติหรือชื่อลงทะเบียนพิเศษตัวเลือกนี้สามารถใช้สถาปัตยกรรม ARM บังคับ disassembler เพื่อตีความคำแนะนำทั้งหมดเป็นคำแนะนำ Thumb โดยใช้สวิตช์ - - disassembler-options force-thumb สิ่งนี้มีประโยชน์เมื่อพยายามถอดนิ้วหัวแม่มือที่ผลิตโดยคอมไพเลอร์อื่น ๆ สำหรับ x86 บางตัวเลือกฟังก์ชันที่ซ้ำกันของสวิตช์ - m แต่อนุญาตให้มีการควบคุมเม็ดเล็กลงหลายตัวเลือกต่อไปนี้อาจเป็น ระบุเป็นสตริงที่คั่นด้วยเครื่องหมายจุลภาค x86-64 i386 และ i8086 เลือก disassembly สำหรับสถาปัตยกรรม intel ที่ระบุและเลือก att ระหว่างโหมดไวยากรณ์ของ Intel และรูปแบบ syntax AT T addr32 addr16 data32 และ data16 specif y ขนาดที่อยู่เริ่มต้นและขนาดของโอเปอเรเตอร์ตัวเลือกทั้งสี่ตัวนี้จะถูกแทนที่ถ้า x86-64 i386 หรือ i8086 ปรากฏในสตริงตัวเลือกท้ายสุด suffix เมื่ออยู่ในโหมด AT สั่งให้ disassembler พิมพ์คำต่อท้าย mnemonic แม้ว่า suffix จะเป็น inferred โดยตัวดำเนินการสำหรับ PPC, booke booke32 และ booke64 ให้เลือกถอดชุดคำแนะนำ BookE 32 และ 64 เลือก PowerPC และ PowerPC64 ถอดตามลำดับ e300 เลือกการถอดประกอบสำหรับตระกูล e300 สำหรับ MIPS ตัวเลือกนี้จะควบคุมการพิมพ์ชื่อย่อคำสั่งและชื่อลงทะเบียน ในคำแนะนำในการถอดส่วนเลือกจากตัวเลือกต่อไปนี้อาจมีการระบุเป็นสตริงที่คั่นด้วยจุลภาคและตัวเลือกที่ไม่ถูกต้องจะถูกละเว้นไม่มีนามแฝงพิมพ์คำสั่งการเรียนรู้แบบดิ้นรนแทนคำสั่งหลอกบางตัวพิมพ์ IE daddu หรือแทนการย้าย sll แทน nop, etc gpr-names ABI พิมพ์ชื่อรีจีสทรี GPR ทั่วไปตามความเหมาะสมกับ ABI ที่ระบุโดยค่าเริ่มต้นชื่อ GPR จะถูกเลือก accordi ng ไปยัง ABI ของไบนารีที่ถูกถอด fpr-names ABI พิมพ์ FPR floating-point ลงทะเบียนชื่อตามความเหมาะสมกับ ABI ที่ระบุโดยค่าเริ่มต้นพิมพ์หมายเลข FPR แทนชื่อ cp0 ชื่อ ARCH Print CP0 ตัวประมวลผล coprocessor ร่วม 0 ชื่อ register as เหมาะสมสำหรับ CPU หรือสถาปัตยกรรมที่ระบุโดย ARCH ตามค่าเริ่มต้นชื่อการลงทะเบียน CP0 จะถูกเลือกตามสถาปัตยกรรมและ CPU ของไบนารีที่ถูกถอดส่วนชื่อรีซอร์ส ARCH Print HWR ที่ถูกถอดออกโดยใช้ชื่อคำสั่ง rdhwr ตามความเหมาะสมสำหรับ CPU หรือสถาปัตยกรรม ระบุโดย ARCH โดยค่าเริ่มต้นชื่อ HWR จะถูกเลือกตามสถาปัตยกรรมและ CPU ของไบนารีที่ถูกถอดชื่อ reg-names ABI พิมพ์ชื่อ GPR และ FPR ตามความเหมาะสมสำหรับชื่อ ABI reg-ARCH ที่พิมพ์เฉพาะการลงทะเบียน CPU เฉพาะ CP0 register และ HWR ชื่อตามความเหมาะสมสำหรับ CPU หรือสถาปัตยกรรมที่เลือกไว้สำหรับตัวเลือกใด ๆ ที่ระบุไว้ด้านบน ABI หรือ ARCH อาจระบุเป็นตัวเลขเพื่อให้มีหมายเลขที่พิมพ์ r คุณสามารถแสดงรายการค่าที่มีอยู่ของ ABI และ ARCH โดยใช้ตัวเลือก --help สำหรับ VAX คุณสามารถระบุที่อยู่รายการฟังก์ชันได้ด้วย - M entry 0xf00ba คุณสามารถใช้หลาย ๆ ครั้งเพื่อถอดส่วนออกได้อย่างถูกต้อง ไฟล์ไบนารี VAX ที่ไม่ได้มีตารางสัญลักษณ์เช่น ROM dumps ในกรณีเหล่านี้หน้ากากรายการฟังก์ชันจะถูกถอดรหัสเป็นคำแนะนำ VAX ซึ่งอาจนำไปสู่ส่วนที่เหลือของฟังก์ชันที่ถูกถอดออกอย่างไม่ถูกต้อง - p-private-headers พิมพ์ข้อมูล ที่เฉพาะเจาะจงกับรูปแบบไฟล์ข้อมูลข้อมูลที่แน่นอนพิมพ์ขึ้นอยู่กับรูปแบบไฟล์อ็อบเจ็กต์สำหรับบางรูปแบบไฟล์อ็อบเจ็กต์จะไม่มีการพิมพ์ข้อมูลเพิ่มเติม - r --reloc พิมพ์รายการรีมาร์เก็ตติ้งของไฟล์ถ้าใช้กับ - d หรือ - D relocations ถูกพิมพ์สลับกับ disassembly - R - dynamic - reloc พิมพ์รายการย้ายแบบไดนามิกของไฟล์นี้มีความหมายเฉพาะสำหรับวัตถุแบบไดนามิกเช่นไลบรารีที่ใช้ร่วมกันบางประเภท - s - เต็มเนื้อหาแสดงเนื้อหาทั้งหมดของส่วนใด ๆ ที่ร้องขอโดยค่าเริ่มต้นส่วนที่ไม่ว่างเปล่าทั้งหมดจะถูกแสดงขึ้น - S - ซอร์สโค้ดซอร์สโค้ดแสดงผสมกับการถอดชิ้นส่วนถ้าเป็นไปได้ Implies - d-show-raw-insn เมื่อคำแนะนำในการถอดประกอบ, พิมพ์คำสั่งในรูป hex และในรูปแบบสัญลักษณ์นี่คือค่าเริ่มต้นยกเว้นเมื่อใช้ --prefix-address - no-show-raw-insn เมื่อคำแนะนำในการถอดประกอบไม่พิมพ์ไบต์คำสั่งนี่เป็นค่าดีฟอลต์เมื่อ - ใช้คำนำหน้า - แอดเดรส - W --dwarf แสดงเนื้อหาของส่วนดีท็อกซ์ของไฟล์ DWARF ถ้ามีอยู่ - G --stabs แสดงเนื้อหาทั้งหมดของส่วนใด ๆ ที่ร้องขอแสดงเนื้อหาของส่วนและและส่วนต่างๆจาก ELF ไฟล์นี้มีประโยชน์เฉพาะในระบบต่างๆเช่น Solaris 2 0 ซึ่งมีรายการตารางสัญลักษณ์การแก้จุดบกพร่องในส่วนเอลฟ์ในรูปแบบไฟล์อื่น ๆ ส่วนใหญ่การดีบักรายการตารางสัญลักษณ์จะมีการเชื่อมโยงกันโดยใช้สัญลักษณ์การเชื่อมโยงและสามารถมองเห็นได้ใน --syms output สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ stabs ให้ดู Stabs --start address address เริ่มแสดงข้อมูลตามที่อยู่ที่ระบุส่งผลต่อผลลัพธ์ของตัวเลือก - d - r และ - stop-address แอดเดรสหยุดการแสดงข้อมูลตามที่อยู่ที่ระบุ ตัวเลือก - d - r และ - s - t --syms พิมพ์รายการตารางสัญลักษณ์ของไฟล์ซึ่งคล้ายกับข้อมูลที่ได้จากโปรแกรม nm - T --dynamic-syms พิมพ์รายการตารางสัญลักษณ์แบบไดนามิกของไฟล์ มีความหมายเฉพาะสำหรับวัตถุแบบไดนามิกเช่นไลบรารีที่ใช้ร่วมกันบางชนิดซึ่งคล้ายกับข้อมูลที่ได้รับจากโปรแกรม nm เมื่อได้รับตัวเลือก - D-dynamic - special-syms เมื่อแสดงสัญลักษณ์รวมถึงเป้าหมายที่พิจารณา พิเศษในบางวิธีและซึ่งโดยปกติจะไม่เป็นที่สนใจของผู้ใช้ - V-version พิมพ์หมายเลขเวอร์ชันของ objdump และออก - x - ส่วนหัวทั้งหมดแสดงข้อมูลส่วนหัวที่มีทั้งหมดรวมทั้งตารางสัญลักษณ์และรายการการย้ายโดยใช้ - x เท่ากับระบุ การจัดรูปแบบบางบรรทัดสำหรับอุปกรณ์เอาต์พุตที่มีมากกว่า 80 คอลัมน์นอกจากนี้ไม่ตัดทอนชื่อสัญลักษณ์เมื่อมีการแสดง - z --disassemble-zeroes โดยปกติ เอาท์พุท disassembly จะข้ามบล็อคของ zeroes ตัวเลือกนี้นำ disassembler เพื่อถอดบล็อกเหล่านั้นเช่นเดียวกับข้อมูลอื่น ๆ ใด ๆ objdump แสดงข้อมูลเกี่ยวกับไฟล์วัตถุอย่างน้อยหนึ่งไฟล์ตัวเลือกจะควบคุมข้อมูลเฉพาะที่จะแสดงข้อมูลนี้เป็นประโยชน์กับผู้เขียนโปรแกรมที่เป็นส่วนใหญ่ ทำงานกับเครื่องมือการรวบรวมในทางตรงกันข้ามกับโปรแกรมเมอร์ที่ต้องการเพียงแค่โปรแกรมของพวกเขาเพื่อรวบรวมและ work. objfile เป็นไฟล์วัตถุที่จะตรวจสอบเมื่อคุณระบุที่เก็บไว้ objdump แสดงข้อมูลเกี่ยวกับแต่ละไฟล์วัตถุสมาชิกรูปแบบยาวและสั้นของ ตัวเลือกที่แสดงที่นี่เป็นทางเลือกมีค่าอย่างน้อยหนึ่งตัวเลือกจากรายการ - a, - d, - D, - f, - g, - G, - h, - H, - p, - r, - R, - S, - T, - T, - V, - X จะต้องได้รับ - a - archive-header หากไฟล์ objfile ใดเป็นที่เก็บถาวรให้แสดงผล ข้อมูลส่วนหัวที่จัดเก็บในรูปแบบคล้าย ls - l นอกจากข้อมูลที่คุณสามารถแสดงรายการด้วย ar tv objdump - a จะแสดงรูปแบบไฟล์อ็อบเจ็กต์ของแต่ละสมาชิกที่เก็บถาวร - adjust-vma offset เมื่อข้อมูลการทุ่มตลาดก่อนเพิ่มค่าชดเชยให้ทั้งหมด ส่วนนี้จะเป็นประโยชน์ถ้าที่อยู่ของส่วนไม่ตรงกับตารางสัญลักษณ์ซึ่งอาจเกิดขึ้นได้เมื่อวางส่วนไว้ในที่อยู่เฉพาะเมื่อใช้รูปแบบที่ไม่สามารถระบุที่อยู่ของส่วนเช่น b - ชื่อ bfdname --target bfdname ระบุว่า รูปแบบ object-code สำหรับไฟล์อ็อบเจ็กต์คือ bfdname ตัวเลือกนี้อาจไม่จำเป็นต้อง objdump สามารถรับรู้ข้อมูลรูปแบบต่างๆได้โดยอัตโนมัติ displays ข้อมูลสรุปจากส่วนหัวข้อ - h ของ fu o ซึ่งระบุอย่างชัดเจนว่า - m เป็นไฟล์ VAX object ในรูปแบบที่ผลิต โดยคอมไพเลอร์ Oasys คุณสามารถแสดงรายการรูปแบบที่มีอยู่ได้ด้วยตัวเลือก - i ดูส่วนที่ 15 1 Target Selection เพื่อดูข้อมูลเพิ่มเติม - C --demangle style ถอดรหัส demangle ชื่อสัญลักษณ์ระดับต่ำลงใน user-lev el names นอกจากนี้การลบเครื่องหมายเริ่มต้นที่ prepended โดยระบบทำให้ชื่อ C function สามารถอ่านได้คอมไพเลอร์ที่แตกต่างกันมีลักษณะการบิดเบือนที่แตกต่างกันอาร์กิวเมนต์สไตล์ demangling ที่เป็นตัวเลือกสามารถใช้เพื่อเลือกรูปแบบการลดการบีบอัดที่เหมาะสมสำหรับคอมไพเลอร์ของคุณโปรดดูข้อมูลเพิ่มเติมที่ demangling. - G --debugging ข้อมูลการดีบักการแสดงผลนี้พยายามแยกวิเคราะห์ข้อมูลการดีบักที่เก็บอยู่ในไฟล์และพิมพ์ออกโดยใช้ไวยากรณ์ C เช่นเดียวกับข้อมูลการดีบักบางชนิดเท่านั้นที่ถูกนำมาใช้งาน - d --disassemble แสดงเมมโมรี่สติกของ assembler สำหรับ คำสั่งเครื่องจาก objfile ตัวเลือกนี้จะแยกส่วนเท่านั้นส่วนที่คาดว่าจะมีคำแนะนำ D - disassemble-all เช่น - d แต่แยกส่วนเนื้อหาของทุกส่วนไม่ใช่เฉพาะที่คาดว่าจะมีคำแนะนำไว้ --- prefix-addresses เมื่อถอดชิ้นส่วน , พิมพ์ที่อยู่ที่สมบูรณ์ในแต่ละบรรทัดนี่เป็นรูปแบบการถอดประกอบเก่า ๆ - disassemble-zeroes โดยปกติ disas s-output จะข้ามบล็อคของ zeroes ตัวเลือกนี้จะนำ disassembler เพื่อถอดส่วนต่างๆออกเช่นเดียวกับข้อมูลอื่น ๆ EB - EL - endian ระบุ endianness ของไฟล์ object ซึ่งจะมีผลต่อ disassembly เท่านั้นซึ่งจะเป็นประโยชน์เมื่อทำการถอดแยกรูปแบบไฟล์ ซึ่งไม่ได้อธิบายข้อมูล endianness เช่น S-records. - f --file-header แสดงข้อมูลสรุปจากส่วนหัวโดยรวมของไฟล์ objfile แต่ละไฟล์-- file-start-context ระบุว่าเมื่อแสดงการถอดรหัสซอร์สโค้ดที่ถูกแทนที่ - S จากไฟล์ที่ยังไม่ได้แสดงให้ขยายบริบทไปยังจุดเริ่มต้นของไฟล์-h - section-header --header แสดงข้อมูลสรุปจากส่วนหัวส่วนหัวของไฟล์ object ส่วนของไฟล์อาจถูกย้ายไป ที่อยู่ที่ไม่เป็นมาตรฐานตัวอย่างเช่นโดยการใช้ตัวเลือก Ttext - Tdata หรือ - Tbss เพื่อ ld อย่างไรก็ตามบางรูปแบบไฟล์อ็อบเจ็กต์เช่นไม่เก็บที่อยู่เริ่มต้นของส่วนของไฟล์ในสถานการณ์เหล่านั้นแม้ว่า ld relocates ส่วน co อย่างถูกต้องโดยใช้ objdump - h เพื่อแสดงส่วนหัวของส่วนหัวของไฟล์ไม่สามารถแสดงแอดเดรสที่ถูกต้องแทนจะแสดงที่อยู่ตามปกติซึ่งเป็นนัยสำหรับเป้าหมาย - ช่วยพิมพ์สรุปตัวเลือกเพื่อ objdump และ exit. - i - แสดงรายชื่อที่แสดงสถาปัตยกรรมและรูปแบบอ็อบเจ็กต์ทั้งหมดสำหรับข้อมูลจำเพาะที่มีชื่อ - b หรือ - m. - j ชื่อ - ชื่อการซิงค์แสดงข้อมูลเฉพาะสำหรับชื่อส่วน - l --line-numbers ป้ายข้อความที่แสดงโดยใช้ข้อมูลการดีบักด้วยชื่อไฟล์ และหมายเลขบรรทัดของแหล่งที่มาที่สอดคล้องกับรหัสอ็อบเจ็กต์หรือ relocs ที่แสดงเฉพาะที่มีประโยชน์กับ - d - D หรือ - r. - m machine --architecture machine ระบุสถาปัตยกรรมที่จะใช้เมื่อทำการถอดชิ้นส่วนวัตถุซึ่งจะเป็นประโยชน์เมื่อทำการถอดชิ้นส่วนวัตถุซึ่งไม่ได้ อธิบายข้อมูลเกี่ยวกับสถาปัตยกรรมเช่น S-records คุณสามารถแสดงสถาปัตยกรรมที่พร้อมใช้งานได้ด้วยตัวเลือก - i ตัวเลือก M ตัวเลือกตัวเลือกแยกตัวเลือกส่งข้อมูลเฉพาะเป้าหมายไปยัง disassembler เฉพาะในบางเป้าหมายเท่านั้นหากเป้าหมาย เป็นสถาปัตยกรรม ARM แล้วสวิทช์นี้สามารถใช้เพื่อเลือกชุดชื่อรีจิสเตอร์ที่ใช้ในระหว่างการถอดรหัสระบุ - M reg-name-std ค่าดีฟอลต์จะเลือกชื่อรีจิสเตอร์ที่ใช้ในคู่มือชุด ARM แต่มีรีจิสเตอร์ 13 ชื่อ sp , ลงทะเบียน 14 lr เรียกว่าและลงทะเบียน 15 เรียกว่า pc ระบุ - M reg-name-apcs จะเลือกชุดชื่อที่ใช้โดย ARM Procedure Call Standard ในขณะที่ระบุ - M reg-name-raw จะใช้ r ตามด้วยหมายเลขทะเบียน นอกจากนี้ยังมีสองรูปแบบในแบบแผนการตั้งชื่อการลงทะเบียน APCS ที่เปิดใช้งานโดย - M reg-names-atpcs และ - M reg-names-special-atpcs ซึ่งใช้อนุสัญญาตั้งชื่อมาตรฐาน ARM Thumb Procedure Call ทั้งที่มีชื่อ register ปกติหรือ register พิเศษ names ตัวเลือกนี้ยังสามารถใช้สำหรับสถาปัตยกรรม ARM เพื่อบังคับให้ disassembler ตีความคำแนะนำทั้งหมดเป็นคำแนะนำ Thumb โดยใช้สวิตช์ตัวเลือก - isassembler-force สิ่งนี้จะเป็นประโยชน์เมื่อพยายามถอดชิ้นส่วนรหัส thumb code ออก ed โดยคอมไพเลอร์อื่น ๆ สำหรับ x86 บางตัวเลือกฟังก์ชันที่ซ้ำกันของสวิตช์ - m แต่อนุญาตให้มีการควบคุมเม็ดเล็กลงบางตัวเลือกต่อไปนี้อาจระบุเป็นสตริงที่คั่นด้วยเครื่องหมายจุลภาค x86-64 i386 และ i8086 เลือกการถอดประกอบสำหรับที่กำหนด สถาปัตยกรรม intel และ att เลือกระหว่างโหมด syntax ของ Intel และโหมด syntax ของ AT T addr32 addr16 data32 และ data16 ระบุขนาดที่อยู่เริ่มต้นและขนาดตัวถูกดำเนินการตัวเลือกทั้งสี่ตัวนี้จะถูกแทนที่ถ้า x86-64 i386 หรือ i8086 ปรากฏขึ้นในสตริงตัวเลือกท้ายสุด suffix ในโหมด AT ให้คำสั่ง dissassembler เพื่อพิมพ์คำต่อท้าย mnemonic แม้ว่าคำต่อท้ายอาจถูกอนุมานโดย operands สำหรับ PPC booke booke32 และ booke64 ให้เลือก disassembly ของคำแนะนำ BookE 32 และ 64 ให้เลือก PowerPC และ PowerPC64 disassembly ตามลำดับ p - พิมพ์ข้อมูลที่เฉพาะเจาะจงกับรูปแบบไฟล์ข้อมูลพิมพ์ข้อมูลที่แน่นอนขึ้นอยู่กับรูปแบบไฟล์อ็อบเจ็กต์สำหรับรูปแบบไฟล์อ็อบเจ็กต์บางรูปแบบไม่มีข้อมูลเพิ่มเติม ข้อมูลจะถูกพิมพ์ออกมา - r --reloc พิมพ์รายการการยายถิ่นของไฟลถาใชกับ - d หรือ - D การยายจะถูกพิมพสลับกับการถอดชิ้นสวน - R - dynamic-reloc พิมพรายการการยายถิ่นแบบไดนามิกของไฟล เฉพาะเนื้อหาที่มีความหมายสำหรับวัตถุแบบไดนามิกเช่นไลบรารีที่แบ่งใช้บางประเภท s - fulll เนื้อหาแสดงเนื้อหาทั้งหมดของส่วนใด ๆ ที่ร้องขอ - S - ซอร์สโค้ดแสดงแหล่งที่มาผสมกับการถอดชิ้นส่วนถ้าเป็นไปได้ Implies - d .-- show-raw-insn เมื่อคำแนะนำในการถอดประกอบพิมพ์คำสั่งในรูป hex และในรูปแบบสัญลักษณ์นี่คือค่าเริ่มต้นยกเว้นเมื่อใช้ --prefix-addresses-- no-show-raw-insn เมื่อไม่ได้พิมพ์คำแนะนำในการถอดประกอบชิ้นส่วน ไบต์การเรียนการสอนนี่คือค่าดีฟอลต์เมื่อใช้ --prefix-addresses - G - stabs แสดงเนื้อหาทั้งหมดของส่วนใด ๆ ที่ร้องขอแสดงเนื้อหาของไฟล์และส่วนต่างๆจากไฟล์ ELF ซึ่งมีประโยชน์เฉพาะบนระบบต่างๆเช่น Solaris 2 0 ซึ่งจะมีรายการตารางสัญลักษณ์แก้จุดบกพร่อง ในส่วนของ ELF ในรูปแบบแฟ้มอื่น ๆ ส่วนใหญ่การดีบักรายการตารางสัญลักษณ์จะถูกแทรกซึมด้วยสัญลักษณ์การเชื่อมโยงและจะปรากฏในผลลัพธ์ --syms สำหรับข้อมูลเพิ่มเติมเกี่ยวกับสัญลักษณ์ stabs ให้ดูหัวข้อ Stabs Overview ในรูปแบบการแก้ปัญหา stabs-- เริ่มต้น ที่อยู่แอดเดรสที่อยู่หยุดการแสดงข้อมูลตามที่ระบุที่อยู่นี้ส่งผลต่อการแสดงผลของ - d - r และ - s - options - t - syms พิมพ์รายการตารางสัญลักษณ์ของไฟล์นี้จะคล้ายกับข้อมูลที่มาจากโปรแกรม nm - T - ไดนามิก syms - พิมพ์รายการตารางสัญลักษณ์แบบไดนามิกของไฟล์นี้มีความหมายเฉพาะสำหรับไดนามิก วัตถุเช่นไลบรารีที่ใช้ร่วมกันบางชนิดข้อมูลนี้คล้ายกับข้อมูลที่ได้รับจากโปรแกรม nm เมื่อได้รับตัวเลือก - D-dynamic--- รุ่นพิมพ์หมายเลขเวอร์ชันของ objdump และ exit. - x - แสดงส่วนหัวทั้งหมด ข้อมูลส่วนหัวที่มีอยู่ทั้งหมดรวมถึงตารางสัญลักษณ์และ relocation entries การใช้ - x เทียบเท่ากับการระบุ all - a - f - h - r - t. - w --wide กำหนดรูปแบบบางบรรทัดสำหรับอุปกรณ์เอาท์พุทที่มีมากกว่า 80 คอลัมน์นอกจากนี้ยังไม่ตัดชื่อสัญลักษณ์เมื่อมีการแสดงผล objdump แสดงข้อมูลเกี่ยวกับไฟล์อ็อบเจ็กต์อย่างน้อยหนึ่งไฟล์ตัวเลือกควบคุมว่าข้อมูลใดที่จะแสดงข้อมูลนี้เป็นประโยชน์กับผู้เขียนโปรแกรมที่กำลังทำงานกับเครื่องมือรวบรวมข้อมูลแทนที่จะเป็นโปรแกรมเมอร์ที่ต้องการเพียงแค่โปรแกรมคอมไพล์และ work. objfile เท่านั้น ไฟล์ที่จะถูกตรวจสอบเมื่อคุณระบุที่เก็บไว้ objdump จะแสดงข้อมูลเกี่ยวกับไฟล์อ็อบเจ็กต์ของสมาชิกแต่ละไฟล์รูปแบบที่ยาวและสั้นของตัวเลือกแสดงที่นี่เป็นทางเลือกเทียบเท่าตัวเลือกอย่างน้อยหนึ่งตัวจากรายการ - a, - d, - D , - e, - f, - g, - G, - h, - H, - p, - P, - r, - R, - s, - S, - t, - T, - V, - x ต้องเป็น ให้ - a --archive-header หากไฟล์ objfile ใดเป็นที่เก็บถาวรให้แสดงข้อมูลส่วนหัวที่เก็บไว้ในรูปแบบคล้ายกับ ls - l นอกจากข้อมูลที่คุณสามารถแสดงรายการด้วย ar tv, ob jdump - a แสดงรูปแบบไฟล์อ็อบเจ็กต์ของแต่ละสมาชิกที่จัดเก็บ - adjust-vma offset เมื่อข้อมูลการทุ่มตลาดก่อนเพิ่มค่าชดเชยให้กับที่อยู่ของส่วนทั้งหมดซึ่งเป็นประโยชน์ถ้าส่วนที่อยู่ไม่ตรงกับตารางสัญลักษณ์ซึ่งสามารถเกิดขึ้นได้เมื่อวาง ส่วนที่อยู่เฉพาะเมื่อใช้รูปแบบที่ไม่สามารถแสดงที่อยู่ส่วนเช่น bbdname b - ชื่อ bfdname ระบุว่ารูปแบบ object-code สำหรับไฟล์อ็อบเจ็กต์คือ bfdname ตัวเลือกนี้อาจไม่จำเป็นต้อง objdump สามารถจดจำรูปแบบต่างๆได้โดยอัตโนมัติ แสดงข้อมูลสรุปจากส่วนหัวข้อ - h ของ fu o ซึ่งระบุอย่างชัดเจนว่า - m เป็นไฟล์อ็อบเจ็กต์ VAX ในรูปแบบที่สร้างโดยคอมไพเลอร์ Oasys คุณสามารถแสดงรูปแบบที่มีอยู่ได้ด้วย - i option ดูการเลือกเป้าหมายสำหรับข้อมูลเพิ่มเติม - C - - demangle style ถอดรหัส demangle ชื่อสัญลักษณ์ระดับต่ำลงในชื่อระดับผู้ใช้นอกจากการลบเครื่องหมายขีดล่างใด ๆ ที่เริ่มต้นด้วยระบบแล้วจะทำให้ชื่อฟังก์ชัน C สามารถอ่านได้ compi ที่แตกต่างกัน อาร์กิวเมนต์สไตล์ demangling เลือกสามารถใช้เพื่อเลือกรูปแบบ demangling ที่เหมาะสมสำหรับคอมไพเลอร์ของคุณดู c filt สำหรับข้อมูลเพิ่มเติมเกี่ยวกับ demangling-g --debugging แสดงข้อมูลการแก้จุดบกพร่องนี้พยายามที่จะแยกวิเคราะห์ STABS และ IEEE ข้อมูลการแก้จุดบกพร่องข้อมูลที่เก็บไว้ใน ไฟล์และพิมพ์ออกโดยใช้ไวยากรณ์ C เหมือนหากทั้งสองรูปแบบเหล่านี้ไม่พบตัวเลือกนี้จะกลับไปที่ตัวเลือก - W เพื่อพิมพ์ข้อมูลใด ๆ ในไฟล์ DWARF - e - debugging-tags เช่น - g แต่ข้อมูลถูกสร้างขึ้น ในรูปแบบที่เข้ากันได้กับเครื่องมือ ctags - d --disassemble แสดงเมตริกผู้ประกอบการสำหรับคำแนะนำเครื่องจาก objfile ตัวเลือกนี้จะแยกชิ้นส่วนเหล่านั้นออกซึ่งคาดว่าจะมีคำสั่ง - D-disassemble-all เช่น - d แต่แยกส่วนประกอบของเนื้อหาทั้งหมด ส่วนไม่เพียง แต่ที่คาดว่าจะมีคำแนะนำตัวเลือกนี้ยังมีผลละเอียดเกี่ยวกับการถอดชิ้นส่วนของคำแนะนำในส่วนรหัสเมื่อตัวเลือก - d อยู่ใน effe ct objdump จะสันนิษฐานว่าสัญลักษณ์ใด ๆ ที่มีอยู่ในส่วนโค้ดเกิดขึ้นบนขอบเขตระหว่างคำสั่งและจะปฏิเสธที่จะแยกส่วนข้ามขอบเขตดังกล่าวเมื่อตัวเลือก - D มีผล แต่สมมติฐานนี้ถูกกดทับซึ่งหมายความว่าเป็นไปได้ที่ผลลัพธ์ของ - d และ - D จะแตกต่างกันถ้าเช่นข้อมูลถูกเก็บไว้ในส่วนของรหัสถ้าเป้าหมายเป็นสถาปัตยกรรม ARM สวิตช์นี้ยังมีผลบังคับใช้การถอดส่วนออกไปเพื่อถอดรหัสชิ้นส่วนข้อมูลที่พบในส่วนของรหัสเหมือนกับว่าเป็นคำแนะนำ --prefix-addresses เมื่อถอดชิ้นส่วนพิมพ์ที่อยู่ที่สมบูรณ์ในแต่ละบรรทัดนี่คือรูปแบบการถอดประกอบเก่า --EB --EL --endian ระบุ endianness ของไฟล์อ็อบเจ็กต์ซึ่งจะมีผลเฉพาะกับการถอดชิ้นส่วนนี้จะเป็นประโยชน์เมื่อถอดชิ้นส่วนรูปแบบไฟล์ที่ทำ ไม่อธิบายข้อมูล endianness เช่น S-records - f --file-headers แสดงข้อมูลสรุปจากส่วนหัวโดยรวมของแต่ละไฟล์ objfile - F-filefreets เมื่อถอดชิ้นส่วนออก ra จะแสดงขึ้นนอกจากนี้ยังแสดงการชดเชยของไฟล์ในพื้นที่ของข้อมูลที่กำลังจะถูกทิ้งหากยกเลิกการข้าม 0 จากนั้นเมื่อดำเนินการต่ออีกครั้งให้บอกผู้ใช้ว่ามีการข้ามจำนวนศูนย์และไฟล์ออฟเซตของตำแหน่งจากที่ใด ระบุว่าเมื่อแสดงการถอดรหัสซอร์สโค้ดที่ถูกแทนที่จะถือว่าไฟล์ - S จากแฟ้มที่ยังไม่ได้แสดงให้ขยายบริบทไปยัง จุดเริ่มต้นของไฟล์ - h - ส่วนหัวหัวเรื่อง - หัวเรื่องแสดงข้อมูลสรุปจากส่วนหัวของไฟล์ object ส่วนของไฟล์อาจถูกย้ายไปยังที่อยู่ที่ไม่เป็นมาตรฐานตัวอย่างเช่นโดยใช้ตัวเลือก "Ttext - Tdata" หรือ - Tbss ไปที่ ld อย่างไรก็ตามบางรูปแบบไฟล์อ็อบเจ็กต์เช่นไม่เก็บที่อยู่เริ่มต้นของส่วนของไฟล์ในสถานการณ์เหล่านั้นแม้ว่า ld จะย้ายส่วนต่างๆอย่างถูกต้องโดยใช้ objdump - h เพื่อแสดงส่วนหัวส่วนหัวของไฟล์ที่ไม่สามารถใช้งานได้ ที่อยู่ที่ถูกต้องแทนจะแสดงที่อยู่ตามปกติซึ่งเป็นนัยสำหรับ targetNotot ในบางกรณีเป็นไปได้ที่ส่วนจะมีทั้ง READONLY และ NOREAD attributes set ในกรณีเช่นนี้แอตทริบิวต์ NOREAD จะได้รับความสำคัญก่อน objdump จะรายงานทั้งสองเนื่องจากการตั้งค่าที่แน่นอนของบิตธงอาจมีความสำคัญ - H --help พิมพ์สรุปตัวเลือกเพื่อ objdump และออก - i --info แสดงรายการที่แสดงสถาปัตยกรรมและรูปแบบอ็อบเจ็กต์ที่พร้อมใช้งานสำหรับข้อกำหนดกับ - b หรือ - m - j ชื่อ - ชื่อส่วนแสดงข้อมูลเฉพาะสำหรับส่วนชื่อ - l --line-numbers ป้ายกำกับการแสดงผลโดยใช้ข้อมูลการดีบักด้วยชื่อไฟล์และหมายเลขบรรทัดอ้างอิงที่ตรงกับรหัสอ็อบเจ็กต์หรือ relocs ที่แสดงเฉพาะที่เป็นประโยชน์กับ - d - D หรือ - r - m machine --architecture machine ระบุสถาปัตยกรรมที่จะใช้เมื่อทำการแยกชิ้นส่วนวัตถุซึ่งจะมีประโยชน์เมื่อทำการถอดชิ้นส่วนวัตถุซึ่งไม่ได้อธิบายข้อมูลเกี่ยวกับสถาปัตยกรรมเช่น S-records คุณสามารถจัดเรียง av ailable architectures ด้วย - i option ถ้าเป้าหมายเป็นสถาปัตยกรรม ARM สวิตช์นี้มีผลเพิ่มเติมมัน จำกัด การถอดชิ้นส่วนให้เป็นเฉพาะคำแนะนำที่สนับสนุนโดยสถาปัตยกรรมที่ระบุโดยเครื่องถ้าจำเป็นต้องใช้สวิตช์นี้เนื่องจากไฟล์อินพุตไม่ทำงาน ไม่ต้องมีข้อมูลสถาปัตยกรรมใด ๆ แต่คุณต้องแยกคำสั่งทั้งหมดออกด้วยตัวเลือก marm - M - ตัวเลือกตัวเลือกแยกย่อยผ่านข้อมูลเฉพาะเป้าหมายไปยัง disassembler เฉพาะในบางกลุ่มเป้าหมายเท่านั้นหากจำเป็นต้องระบุตัวถอดรหัสมากกว่าหนึ่งตัว ตัวเลือกนี้สามารถใช้หรือสามารถวางไว้ด้วยกันในรายการที่คั่นด้วยเครื่องหมายจุลภาคสำหรับ ARC dsp ควบคุมการพิมพ์คำสั่ง DSP spfp เลือกการพิมพ์คำสั่ง FP FPX ความแม่นยำเดียว dpfp จะเลือกการพิมพ์ความแม่นยำสองแบบของ FPX คำแนะนำ FP, quarkseem เลือกการพิมพ์คำสั่ง QuarkSE-EM พิเศษ, fpuda จะเลือกการพิมพ์ของอินพุทความแม่นยำสองแบบ fpus จะเลือกการพิมพ์คำสั่ง FP FP ของ FPU ในขณะที่ fpud เลือกการพิมพ์คำสั่ง FP FP ของ FPU หากมีเป้าหมายเป็นสถาปัตยกรรม ARM สวิตช์นี้สามารถใช้เพื่อเลือกชุดชื่อการลงทะเบียนที่ใช้ระหว่าง disassembler การระบุ - M reg-names-std ค่าดีฟอลต์จะเลือกชื่อรีจิสเตอร์ที่ใช้ในคู่มือชุด ARM แต่ด้วย register 13 เรียกว่า sp, register 14 เรียก lr และ register 15 ชื่อ pc ระบุ - M reg-names-apcs จะเลือกชื่อ ชุดที่ใช้โดย ARM Procedure Call Standard ในขณะที่ระบุ - M reg-names-raw จะใช้ r ตามด้วยหมายเลขทะเบียนนอกจากนี้ยังมีสองตัวแปรในแบบแผนการตั้งชื่อการลงทะเบียน APCS ที่เปิดใช้งานโดย - M reg-names-atpcs และ - M reg-names-special-atpcs ซึ่งใช้ ARM Thumb Procedure Call มาตรฐานการตั้งชื่ออนุสัญญาไม่ว่าจะเป็นชื่อลงทะเบียนปกติหรือชื่อการลงทะเบียนพิเศษตัวเลือกนี้สามารถใช้สำหรับสถาปัตยกรรม ARM เพื่อบังคับ disassembler เพื่อ interp ret ทั้งหมดคำแนะนำเป็นคำแนะนำ Thumb โดยใช้สวิตช์ - demassembler ตัวเลือกบังคับนิ้วหัวแม่มือนี้จะมีประโยชน์เมื่อพยายามถอดนิ้วหัวแม่มือรหัสผลิตโดย compilers. For อื่น ๆ x86 บางตัวเลือกฟังก์ชันที่ซ้ำกันของ - m สลับ แต่ อนุญาตให้มีการควบคุมเม็ดเล็กลงการเลือกหลายรายการจากรายการต่อไปนี้อาจระบุเป็นสตริงคั่นด้วยเครื่องหมายจุลภาค x86-64 i386 i8086 เลือก disassembly สำหรับสถาปัตยกรรม intel att เลือกระหว่างโหมดไวยากรณ์ของ Intel และโหมดไวยากรณ์ AT T amd64 intel64 เลือกระหว่าง AMD64 ISA และ Intel64 ISA intel - mnemonic att-mnemonic Select between intel mnemonic mode and AT T mnemonic mode Note intel-mnemonic implies intel and att-mnemonic implies att addr64 addr32 addr16 data32 data16 Specify the default address size and operand size These four options will be overridden if x86-64 i386 or i8086 appear later in the option string suffix When in AT T mode, instructs the disassembler to print a mnemonic suffix even when the suffix could be inf erred by the operands. For PowerPC, booke controls the disassembly of BookE instructions 32 and 64 select PowerPC and PowerPC64 disassembly, respectively e300 selects disassembly for the e300 family 440 selects disassembly for the PowerPC 440 ppcps selects disassembly for the paired single instructions of the PPC750CL. For MIPS, this option controls the printing of instruction mnemonic names and register names in disassembled instructions Multiple selections from the following may be specified as a comma separated string, and invalid options are ignored no-aliases Print the raw instruction mnemonic instead of some pseudo instruction mnemonic I e print daddu or or instead of move , sll instead of nop , etc msa Disassemble MSA instructions virt Disassemble the virtualization ASE instructions xpa Disassemble the eXtended Physical Address XPA ASE instructions gpr-names ABI Print GPR general-purpose register names as appropriate for the specified ABI By default, GPR names are selected accordi ng to the ABI of the binary being disassembled fpr-names ABI Print FPR floating-point register names as appropriate for the specified ABI By default, FPR numbers are printed rather than names cp0-names ARCH Print CP0 system control coprocessor coprocessor 0 register names as appropriate for the CPU or architecture specified by ARCH By default, CP0 register names are selected according to the architecture and CPU of the binary being disassembled hwr-names ARCH Print HWR hardware register, used by the rdhwr instruction names as appropriate for the CPU or architecture specified by ARCH By default, HWR names are selected according to the architecture and CPU of the binary being disassembled reg-names ABI Print GPR and FPR names as appropriate for the selected ABI reg-names ARCH Print CPU-specific register names CP0 register and HWR names as appropriate for the selected CPU or architecture. For any of the options listed above, ABI or ARCH may be specified as numeric to have numbers printed r ather than names, for the selected types of registers You can list the available values of ABI and ARCH using the --help option. For VAX, you can specify function entry addresses with - M entry 0xf00ba You can use this multiple times to properly disassemble VAX binary files that don t contain symbol tables like ROM dumps In these cases, the function entry mask would otherwise be decoded as VAX instructions, which would probably lead the rest of the function being wrongly disassembled - p --private-headers Print information that is specific to the object file format The exact information printed depends upon the object file format For some object file formats, no additional information is printed - P options --private options Print information that is specific to the object file format The argument options is a comma separated list that depends on the format the lists of options is displayed with the help. For XCOFF, the available options are header aout sections syms relocs lineno, loader e xcept typchk traceback toc ldinfo. Not all object formats support this option In particular the ELF format does not use it - r --reloc Print the relocation entries of the file If used with - d or - D the relocations are printed interspersed with the disassembly - R --dynamic-reloc Print the dynamic relocation entries of the file This is only meaningful for dynamic objects, such as certain types of shared libraries As for - r if used with - d or - D the relocations are printed interspersed with the disassembly - s --full-contents Display the full contents of any sections requested By default all non-empty sections are displayed - S --source Display source code intermixed with disassembly, if possible Implies - d --prefix prefix Specify prefix to add to the absolute paths when used with - S --prefix-strip level Indicate how many initial directory names to strip off the hardwired absolute paths It has no effect without --prefix prefix --show-raw-insn When disassembling instructions, print the instruc tion in hex as well as in symbolic form This is the default except when --prefix-addresses is used --no-show-raw-insn When disassembling instructions, do not print the instruction bytes This is the default when --prefix-addresses is used --insn-width width Display width bytes on a single line when disassembling instructions - W lLiaprmfFsoRt --dwarf rawline, decodedline, info, abbrev, pubnames --dwarf aranges, macro, frames, frames-interp, str, loc --dwarf Ranges, pubtypes, traceinfo, traceabbrev --dwarf tracearanges, gdbindex Displays the contents of the debug sections in the file, if any are present If one of the optional letters or words follows the switch then only data found in those specific sections will be dumped. Note that there is no single letter option to display the content of trace sections or. Note the output from the info option can also be affected by the options --dwarf-depth the --dwarf-start and the --dwarf-check --dwarf-depth n Limit the dump of the section to n child ren This is only useful with --dwarf info The default is to print all DIEs the special value 0 for n will also have this effect. With a non-zero value for n DIEs at or deeper than n levels will not be printed The range for n is zero-based --dwarf-start n Print only DIEs beginning with the DIE numbered n This is only useful with --dwarf info. If specified, this option will suppress printing of any header information and all DIEs before the DIE numbered n Only siblings and children of the specified DIE will be printed. This can be used in conjunction with --dwarf-depth --dwarf-check Enable additional checks for consistency of Dwarf information - G --stabs Display the full contents of any sections requested Display the contents of the and and sections from an ELF file This is only useful on systems such as Solaris 2 0 in which debugging symbol-table entries are carried in an ELF section In most other file formats, debugging symbol-table entries are interleaved with linkage symbols, and are vi sible in the --syms output --start-address address Start displaying data at the specified address This affects the output of the - d - r and - s options --stop-address address Stop displaying data at the specified address This affects the output of the - d - r and - s options - t --syms Print the symbol table entries of the file This is similar to the information provided by the nm program, although the display format is different The format of the output depends upon the format of the file being dumped, but there are two main types One looks like this. where the number inside the square brackets is the number of the entry in the symbol table, the sec number is the section number, the fl value are the symbol s flag bits, the ty number is the symbol s type, the scl number is the symbol s storage class and the nx value is the number of auxilary entries associated with the symbol The last two fields are the symbol s value and its name. The other common output format, usually seen with ELF based fi les, looks like this. Here the first number is the symbol s value sometimes refered to as its address The next field is actually a set of characters and spaces indicating the flag bits that are set on the symbol These characters are described below Next is the section with which the symbol is associated or ABS if the section is absolute ie not connected with any section , or UND if the section is referenced in the file being dumped, but not defined there. After the section name comes another field, a number, which for common symbols is the alignment and for other symbol is the size Finally the symbol s name is displayed. The flag characters are divided into 7 groups as follows l g u The symbol is a local l , global g , unique global u , neither global nor local a space or both global and local A symbol can be neither local or global for a variety of reasons, e g because it is used for debugging, but it is probably an indication of a bug if it is ever both local and global Unique global sy mbols are a GNU extension to the standard set of ELF symbol bindings For such a symbol the dynamic linker will make sure that in the entire process there is just one symbol with this name and type in use w The symbol is weak w or strong a space C The symbol denotes a constructor C or an ordinary symbol a space W The symbol is a warning W or a normal symbol a space A warning symbol s name is a message to be displayed if the symbol following the warning symbol is ever referenced I i The symbol is an indirect reference to another symbol I , a function to be evaluated during reloc processing i or a normal symbol a space d D The symbol is a debugging symbol d or a dynamic symbol D or a normal symbol a space F f O The symbol is the name of a function F or a file f or an object O or just a normal symbol a space - T --dynamic-syms Print the dynamic symbol table entries of the file This is only meaningful for dynamic objects, such as certain types of shared libraries This is similar to the infor mation provided by the nm program when given the - D --dynamic option. The output format is similar to that produced by the --syms option, except that an extra field is inserted before the symbol s name, giving the version information associated with the symbol If the version is the default version to be used when resolving unversioned references to the symbol then it s displayed as is, otherwise it s put into parentheses --special-syms When displaying symbols include those which the target considers to be special in some way and which would not normally be of interest to the user - V --version Print the version number of objdump and exit - x --all-headers Display all available header information, including the symbol table and relocation entries Using - x is equivalent to specifying all of - a - f - h - p - r - t - w --wide Format some lines for output devices that have more than 80 columns Also do not truncate symbol names when they are displayed - z --disassemble-zeroes Normally the disassembly output will skip blocks of zeroes This option directs the disassembler to disassemble those blocks, just like any other data. or --target instead of - b - D is disassemble the contents of all sections - b bfdname or --target bfdname will force reading as specified object-code format not elf but raw binary in our case - m machine will specify the architecture to use in our file there is no header with arch info - M options are options of disassembler addr16,data16 are used to specify the default address size and operand size treat code as i8086 one in the universal x86 disasm engine osgx Nov 28 12 at 16 41.-b specifies 16-, 32- or 64-bit mode The default is 16-bit mode - o is the notional load address for the file This option causes ndisasm to get the addresses it lists down the left hand margin, and the target addresses of PC-relative jumps and calls, right - s specifies a synchronisation address, such that ndisasm will not output any machine instruction which encompasses bytes on both sides of the address Hence the instruction which starts at that address will be correctly disassembled Janus Troelsen May 6 13 at 18 49.starblue and hlovdal both have parts of the canonical answer If you want to disassemble raw i8086 code, you usually want Intel syntax, not AT T syntax, too, so use. If your code is ELF or or E COFF , you can use the short form. For 32-bit or 64-bit code, omit the ,8086 the ELF header already includes this information. ndisasm as suggested by jameslin is also a good choice, but objdump usually comes with the OS and can deal with all architectures supported by GNU binutils superset of those supported by GCC , and its output can usually be fed into GNU as ndisasm s can usually be fed into nasm though, of course. Peter Cordes suggests that Agner Fog s objconv is very nice It puts labels on branch targets, making a lot easier to figure out what the code does It can disassemble into NASM, YASM, MASM, or AT T GNU syntax. Multimedia Mike already found out about --adjus t-vma the ndisasm equivalent is the - o option. To disassemble, say, sh4 code I used one binary from Debian to test , use this with GNU binutils almost all other disassemblers are limited to one platform, such as x86 with ndisasm and objconv. The - m is the machine, and - EL means Little Endian for sh4eb use - EB instead , which is relevant for architectures that exist in either endianness. answered Dec 22 15 at 20 44.It built fine right out of the box on GNU Linux, for me But yes, it s x86 x86-64 only, unlike GNU binutils However, it has a lot of nice x86-specific hints that it adds as comments, like when an operand-size prefix can cause an LCP-stall in the decoders of an Intel CPU By all means, mention it in your answer One of the major purposes of comments is to help the poster improve their answer, not just as something that later viewers need to read, too Peter Cordes Dec 23 15 at 11 11.

No comments:

Post a Comment