6 Accessing and Managing Symbols with armlink
6.4 Image$$ execution region symbols
The linker generates Image$$ symbols for every execution region present in the image.
Table 6-1 Image$$ execution region symbols
| Symbol | Description |
|---|---|
Image$$ |
Execution address of the region. |
Image$$ |
Execution region length in bytes excluding ZI length. |
Image$$ |
Address of the byte beyond the end of the non-ZI part of the execution region. |
Image$$ |
Execution address of the RO output section in this region. |
Image$$ |
Length of the RO output section in bytes. |
Image$$ |
Address of the byte beyond the end of the RO output section in the execution region. |
Image$$ |
Execution address of the RW output section in this region. |
Image$$ |
Length of the RW output section in bytes. |
Image$$ |
Address of the byte beyond the end of the RW output section in the execution region. |
Image$$ |
Execution address of the XO output section in this region. |
Image$$ |
Length of the XO output section in bytes. |
Image$$ |
Address of the byte beyond the end of the XO output section in the execution region. |
Image$$ |
Execution address of the ZI output section in this region. |
Image$$ |
Length of the ZI output section in bytes. |
Image$$ |
Address of the byte beyond the end of the ZI output section in the execution region. |
6.5 Load$$ execution region symbols
The linker generates Load$$ symbols for every execution region present in the image.
Note
Load$$region_name symbols apply only to execution regions. Load$$LR$$load_region_name symbols apply only to load regions.Load$$ execution region present in the image. All the symbols refer to load addresses after the C library is initialized.Table 6-2 Load$$ execution region symbols
| Symbol | Description |
|---|---|
Load$$ |
Load address of the region. |
Load$$ |
Region length in bytes. |
Load$$ |
Address of the byte beyond the end of the execution region. |
Load$$ |
Address of the RO output section in this execution region. |
Load$$ |
Length of the RO output section in bytes. |
Load$$ |
Address of the byte beyond the end of the RO output section in the execution region. |
Load$$ |
Address of the RW output section in this execution region. |
Load$$ |
Length of the RW output section in bytes. |
Load$$ |
Address of the byte beyond the end of the RW output section in the execution region. |
Load$$ |
Address of the XO output section in this execution region. |
Load$$ |
Length of the XO output section in bytes. |
Load$$ |
Address of the byte beyond the end of the XO output section in the execution region. |
Load$$ |
Load address of the ZI output section in this execution region. |
Load$$ |
Load length of the ZI output section in bytes.
The Load Length of ZI is zero unless
region_name has the ZEROPAD scatter-loading keyword set. If ZEROPAD is set then:Load Length =
Image$$ |
Load$$ |
Load address of the byte beyond the end of the ZI output section in the execution region. |
- The symbols are absolute because section-relative symbols can only have execution addresses.
- The symbols take into account RW compression.
- References to linker-defined symbols from RW compressed execution regions must be to symbols that are resolvable before RW compression is applied.
- If the linker detects a relocation from an RW-compressed region to a linker-defined symbol that depends on RW compression, then the linker disables compression for that region.
- Any Zero Initialized data that is written to the file is taken into account by the Limit and Length values. Zero Initialized data is written into the file when the
ZEROPADscatter-loading keyword is used.
6.6 Load$$LR$$ load region symbols
The linker generates Load$$LR$$ symbols for every load region present in the image.
Load$$LR$$ load region can contain many execution regions, so there are no separate $$RO and $$RW components.Note
Load$$LR$$load_region_name symbols apply only to load regions. Load$$region_name symbols apply only to execution regions.Load$$LR$$ load region present in the image.Table 6-3 Load$$LR$$ load region symbols
| Symbol | Description |
|---|---|
Load$$LR$$ |
Address of the load region. |
Load$$LR$$ |
Length of the load region. |
Load$$LR$$ |
Address of the byte beyond the end of the load region. |
6.7 Region name values when not scatter-loading
When scatter-loading is not used when linking, the linker uses default region name values.
ER_XO, for an execute-only execution region, if present.ER_RO, for the read-only execution region.ER_RW, for the read-write execution region.ER_ZI, for the zero-initialized execution region.
Image$$execution region symbols.Load$$execution region symbols.
Load$$ER_RO$$Base.Note
- The ZI output sections of an image are not created statically, but are automatically created dynamically at runtime. Therefore, there is no load address symbol for ZI output sections.
- It is recommended that you use region-related symbols in preference to section-related symbols.
6.9 Methods of importing linker-defined symbols in C and C++
You can import linker-defined symbols into your C or C++ source code either by value or by reference.
- Import by value
-
extern unsigned int symbol_name;
- Import by reference
-
extern void *symbol_name;
int, then you must use the address-of operator (&) to obtain the correct value as shown in these examples:- Importing a linker-defined symbol
-
extern unsigned int Image$$ZI$$Limit;
config.heap_base = (unsigned int) &Image$$ZI$$Limit;
- Importing symbols that define a ZI output section
-
extern unsigned int Image$$ZI$$Length;
extern char Image$$ZI$$Base[];
memset(Image$$ZI$$Base,,(unsigned int)&Image$$Length);
6.11 Section-related symbols
Section-related symbols are symbols generated by the linker when it creates an image without scatter-loading.
- Image symbols, if you do not use scatter-loading to create a simple image. A simple image has up to four output sections (XO, RO, RW, and ZI) that produce the corresponding execution regions.
- Input section symbols, for every input section present in the image.
.text sections are placed in one contiguous block. A contiguous block of sections with the same attribute and name is known as a consolidated section.6.21 Steering file command summary
A summary of the commands you can use in a streering file.
Table 6-6 Steering file command summary
| Command | Description |
|---|---|
EXPORT |
Specifies that a symbol can be accessed by other shared objects or executables. |
HIDE |
Makes defined global symbols in the symbol table anonymous. |
IMPORT |
Specifies that a symbol is defined in a shared object at runtime. |
RENAME |
Renames defined and undefined global symbol names. |
REQUIRE |
Creates a DT_NEEDED tag in the dynamic array. DT_NEEDED tags specify dependencies to other shared objects used by the application, for example, a shared library. |
RESOLVE |
Matches specific undefined references to a defined global symbol. |
SHOW |
Makes global symbols visible. This command is useful if you want to make a specific symbol visible that is hidden using a HIDE command with a wildcard. |
Note
6 Accessing and Managing Symbols with armlink的更多相关文章
- Unity3D & C# 设计模式--23
Unity3D & C#Design Patterns 23 design patterns. Creational Patterns 1. Abstract Factory抽象工厂 创 ...
- 【ASP.NET Identity系列教程(二)】运用ASP.NET Identity
注:本文是[ASP.NET Identity系列教程]的第二篇.本系列教程详细.完整.深入地介绍了微软的ASP.NET Identity技术,描述了如何运用ASP.NET Identity实现应用程序 ...
- TN035: Using Multiple Resource Files and Header Files with Visual C++
TN035: Using Multiple Resource Files and Header Files with Visual C++ This note describes how the Vi ...
- ASP.NET Identity 二 (转载)
来源:http://www.cnblogs.com/r01cn/p/5180892.html#undefined 推荐看原文,这里转载是怕好文章消失了. 注:本文是[ASP.NET Identity系 ...
- PASCAL VOC数据集The PASCAL Object Recognition Database Collection
The PASCAL Object Recognition Database Collection News 04-Apr-07: The VOC2007 challenge development ...
- SQLServer学习-- Microsoft SQL Server 2008 Management Studio Express
Microsoft SQL Server 2008 Management Studio Express is a free, integrated environment for accessing, ...
- Design Pattern ->Composite
Layering & Contract Philosophy With additional indirection class CComponent { ; ; ; public: virt ...
- ASP.NET Identity系列教程-3【运用ASP.NET Identity】
https://www.cnblogs.com/r01cn/p/5180892.html 14 运用ASP.NET Identity In this chapter, I show you how t ...
- Managing a node remotely by using the netapp SP
Managing a node remotely by using the Service Processor The Service Processor (SP) is a remote manag ...
随机推荐
- python内置模块-random
print(random.randint(1,10)) 生成随机整数,下限必须小于上限print(random.randrange(1,10)) 生成随机整数,参数为([start],stop,[st ...
- bzoj1211树的计数 x bzoj1005明明的烦恼 题解(Prufer序列)
1211: [HNOI2004]树的计数 Time Limit: 10 Sec Memory Limit: 162 MBSubmit: 3432 Solved: 1295[Submit][Stat ...
- 其它课程中的python---6、python读取数据
其它课程中的python---6.python读取数据 一.总结 一句话总结: 记常用和特例:慢慢慢慢的就熟了,不用太着急,慢慢来 库的使用都很简单:就是库的常用函数就这几个,后面用的时候学都来得及. ...
- 【HTML】框架集(Framesets)
1.Frameset的使用 所谓框架便是网页画面分成几个框窗,同时取得多个 URL.只 要 <FRAMESET> <FRAME> 即可,而所有框架标记 要放在一个总起的 htm ...
- python 多设备同时安装app包
python 多设备同时安装app包 上代码 #!/usr/bin/env python # -*- encoding: utf-8 -*- import os import time from m ...
- Django+telnetlib实现webtelnet
说明 基于 python3.7 + django 2.2.3 实现的 django-webtelnet.有兴趣的同学可以在此基础上稍作修改集成到自己的堡垒机中. 项目地址:https://github ...
- 巧用Wget快速建立文件下载中心
Wget基本用法:1) 从网上下载单个文件 wget http://www.freehao123.com/file.iso 2) 下载一个文件,但以不同的名字存为本地文件 wget –output-d ...
- LeetCode刷题笔记-DP算法-取数问题
题目描述 (除数博弈论)爱丽丝和鲍勃一起玩游戏,他们轮流行动.爱丽丝先手开局. 最初,黑板上有一个数字 N .在每个玩家的回合,玩家需要执行以下操作: 选出任一 x,满足 0 < x < ...
- Centos7下Firewalld防火墙配置命令
前 言 服务端口日常被拦截,记录一下常用的命令便于查询 Firewalld服务管理 查看防火墙状态 1 systemctl status firewalld 开机启用/禁用防火墙 1 s ...
- Zabbix监控搭建
目录 Zabbix概述 zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案 ( 基于 GPL V2 )zabbix由 2 部分构成,zabbix ...