源:https://stackoverflow.com/questions/30419857/accessing-a-corrupted-shared-library
评:
As you've sort of realized, you're trying to compile assembly for a 32 bit machine, on a 64 bit machine. With the commands you copied and pasted, you're letting as and ld know that you're compiling something 32 bit.
The issue you've run into is that you don't have a 32 bit version of libc available to link against.
apt-get install libc6:i386 libc6-dev-i386
Then assemble the code with:
as --32 -o cpuid2.o cpuid2.s
and finally link it with:
ld -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o cpuid2 -lc cpuid2.o
Then it should work:
[jkominek@kyatt /tmp]$ ./cpuid2
The processor Vendor ID is 'GenuineIntel'
分享到:
相关推荐
* ra_svn : Module for accessing a repository using the svn network protocol. - with Cyrus SASL authentication - handles 'svn' scheme * ra_local : Module for accessing a repository on local disk. - ...
Accessing-Databases-JDBC:如何通过jdbc访问数据库,英文参考资料
讲解了stm32f103运行main函数之前微控制器所做的工作。 总结启动文件的整个过程,分为如下: (1) 系统初始化,包括对中断向量表的重新映射; (2) 加载 RW 段; ...(3) ZI 段清零;...(5) 初始化微库(具体干...
Accessing Web Services from a Visual Web Application
CCNA Exploration 4 Accessing the WAN章节练习题
accessing an Indy RFID Technology-based Radio Module (RFID radio module) 1 . The document begins with a system level overview of the interface and a discussion of topics related to interface ...
SQLAPI++ is a C++ library for accessing multiple SQL databases Oracle SQL Server DB2 Sybase Informix InterBase SQLBase MySQL PostgreSQL SQLite SQL Anywhere and ODBC It uses native APIs of target DBMS ...
WebAssembly: Accessing C and C++ in Web Applications English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 1h 45m | 213 MB Accelerate web applications with native code using WebAssembly. WebAssembly is a ...
a shared infrastructure with the same policies as a private network. accounting (auditing) The process of keeping track of a user’s activity while accessing a network’s resources, including the ...
Accessing Oracle From Java
This Python library for accessing Shopee Seller Store for managing variety of administration tasks.
Accessing Variables in Block Objects 初学者学习代码
BC417 - BAPI Development for Accessing SAP Components
Accessing the WAN, CCNA Exploration Companion Guide
accessing-and-modifying.zip
Accessing MySQL database
Accessing Data With Microsoft@ net 4
这些是学习长在学校培训的CCNA的资料 ,希望对你们有用,哈
Compiling with a shared library 414 Running programs that use shared libraries 415 Debugging Assembly Functions 417 Debugging C programs 417 Debugging assembly functions 418 Summary 420 Chapter 15: ...
The C++ Standard Library A Tutorial and Reference (2nd Edition)+cppstdlib-code.zip C++标准库(第二版)英文版.pdf 非扫描版+源代码 Prefaceto the SecondEdition xxiii Acknowledgments for the Second...