Vim open a binary file to obtain information

Source: Internet
Author: User

A Vim file can be opened in hexadecimal notation

The edited hello. c


$ Arm-Linux-GCC hello. C-O hello

$ Arm-Linux-readelf-s hello

The offset of the. rodata segment is 4d0.
$ Vim-B Hello //-B Indicates special protection for opening a binary file

Run: %! In vim! Xxd in hexadecimal format

Find 4d0/4d0 in VIM



The first row is the internal address of the file, and ":" is followed by the hexadecimal data of the file. The corresponding binary code is found to be ASCII code, and the last line is the original information of the file.

Run %! Xxd-r returns binary mode

If you want to modify it, use the R or R command.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.