ldsseek 或 ldnsseek 子例程
用途
查找公共对象文件的已建立索引或已命名部分。
库
对象文件访问例程库 (libld.a)
语法
#include <stdio.h>
#include <ldfcn.h>
int ldsseek ( ldPointer, SectionIndex)
LDFILE *ldPointer;
unsigned short SectionIndex;
int ldnsseek (ldPointer, SectionName)
LDFILE *ldPointer;
char *SectionName;
#include <ldfcn.h>
int ldsseek ( ldPointer, SectionIndex)
LDFILE *ldPointer;
unsigned short SectionIndex;
int ldnsseek (ldPointer, SectionName)
LDFILE *ldPointer;
char *SectionName;
描述
ldsseek 子例程查找当前与 ldPointer 参数相关联的公共对象文件的 SectionIndex 参数指定的部分。 子例程先确定关联文件的对象方式,然后再查找所指示的部分。
ldnsseek 子例程查找由 SectionName 参数指定的部分。
参数
| 项 | 描述 |
|---|---|
| ldPointer | 指向由于成功调用 ldopen 或 ldaopen 子例程而返回的 LDFILE 结构。 |
| SectionIndex | 指定要将其行号条目种子到的部分的索引。 |
| SectionName | 指定要将其行号条目种子到的部分的名称。 |
返回值
ldsseek 和 ldnsseek 子例程返回 SUCCESS 或 FAILURE 值。
错误代码
如果 SectionIndex 参数大于对象文件中的节数,那么 ldsseek 子例程将失败。 如果没有与 SectionName 参数. 对应的节名称,那么 世界探寻 子例程将失败 如果没有指定节的节数据,或者如果它无法查找到指定节,那么该函数将失败。
注: 第一部分的索引为 1。