Added -n flag
This commit is contained in:
parent
ea09125e30
commit
56033dc0c1
3 changed files with 16 additions and 1 deletions
|
|
@ -15,6 +15,7 @@ typedef int bool;
|
||||||
#define RFLAG 0x01 /* -r flag given. */
|
#define RFLAG 0x01 /* -r flag given. */
|
||||||
#define SFLAG 0x02 /* -s flag given. */
|
#define SFLAG 0x02 /* -s flag given. */
|
||||||
#define CFLAG 0x04 /* -c flag given. */
|
#define CFLAG 0x04 /* -c flag given. */
|
||||||
|
#define NFLAG 0x08 /* -n flag given. */
|
||||||
|
|
||||||
#define PLAIN 0 /* Input file is a normal file. */
|
#define PLAIN 0 /* Input file is a normal file. */
|
||||||
#define ARCHIVE 1 /* Input file is an archive. */
|
#define ARCHIVE 1 /* Input file is an archive. */
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,12 @@ be resolved.
|
||||||
This may be useful for machines that need a last relocation step
|
This may be useful for machines that need a last relocation step
|
||||||
at load time. This flag disables the \fB\-r\fP flag.
|
at load time. This flag disables the \fB\-r\fP flag.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-n
|
||||||
|
Usually, after linking, a value in the namelist represents an absolute
|
||||||
|
address. Sometimes, particularly when using the \fB\-c\fR flag, it may be
|
||||||
|
useful to have as value the offset with respect to the beginning of the
|
||||||
|
corresponding section. The \fB\-n\fR flag enables this.
|
||||||
|
.TP
|
||||||
.B \-s
|
.B \-s
|
||||||
`Strip' the output, that is, remove the name table
|
`Strip' the output, that is, remove the name table
|
||||||
and relocation information to save space (but impair the
|
and relocation information to save space (but impair the
|
||||||
|
|
|
||||||
|
|
@ -175,6 +175,14 @@ first_pass(argv)
|
||||||
DEB = 1;
|
DEB = 1;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case 'n':
|
||||||
|
/* In the resulting name list, leave offsets with
|
||||||
|
respect to the beginning of the section instead
|
||||||
|
of absolute addresses.
|
||||||
|
*/
|
||||||
|
flagword |= NFLAG;
|
||||||
|
break;
|
||||||
|
|
||||||
case 'o':
|
case 'o':
|
||||||
/*
|
/*
|
||||||
* The `name' argument after -o is used as name
|
* The `name' argument after -o is used as name
|
||||||
|
|
@ -367,7 +375,7 @@ evaluate()
|
||||||
{
|
{
|
||||||
norm_commons();
|
norm_commons();
|
||||||
complete_sections();
|
complete_sections();
|
||||||
if (!(flagword&RFLAG))
|
if (!(flagword&(RFLAG|NFLAG)))
|
||||||
change_names();
|
change_names();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue