ldrseek 或 ldnrseek 子例程
用途
用于查找 XCOFF 文件的某个部分的重定位条目。
库
对象文件访问例程库 (libld.a)
语法
#include <stdio.h>
#include <ldfcn.h>
int ldrseek ( ldPointer, SectionIndex)
ldfile *ldPointer;
unsigned short SectionIndex;
int ldnrseek (ldPointer, SectionName)
ldfile *ldPointer;
char *SectionName;
#include <ldfcn.h>
int ldrseek ( ldPointer, SectionIndex)
ldfile *ldPointer;
unsigned short SectionIndex;
int ldnrseek (ldPointer, SectionName)
ldfile *ldPointer;
char *SectionName;
描述
Ldrseek 子例程查找当前与 ldPointer 参数. 关联的公共对象文件的 SectionIndex 参数所指定的部分的重定位条目
ldnrseek 子例程查找 SectionName 参数指定的部分的重定位条目。
尔德寻求 子例程和 ldnrseek 子例程在查找所指示部分的重定位条目之前确定关联文件的对象方式。
参数
| 项 | 描述 |
|---|---|
| ldPointer | 指向作为对 尔德开放, lddopen或 利达公开 子例程的成功调用的结果返回的 LDFILE 结构。 |
| SectionIndex | 指定要寻找其重定位条目的部分的索引。 |
| SectionName | 指定要寻找其重定位条目的部分的名称。 |
返回值
尔德寻求 和 ldnrseek 子例程返回 SUCCESS 或 FAILURE 值。
错误代码
如果 SectionIndex 参数的内容大于对象文件中的节数,那么 ldrseek 子例程将失败。 如果没有与 SectionName 参数对应的节名,那么 ldnrseek 子例程将失败。 如果指定的部分没有重定位条目,或者如果它无法查找指定的重定位条目,那么任一功能都将失败。
注: 第一个部分的索引为 1。