mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-17 17:19:35 +08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
6e4ceb7ba1
@ -202,7 +202,8 @@
|
||||
#define EI_DATA 5
|
||||
#define EI_VERSION 6
|
||||
#define EI_OSABI 7
|
||||
#define EI_PAD 8
|
||||
#define EI_ABIVERSION 8
|
||||
#define EI_NINDENT 16
|
||||
|
||||
#define ELFMAG0 0x7f /* EI_MAG */
|
||||
#define ELFMAG1 'E'
|
||||
@ -257,7 +258,7 @@
|
||||
#define ELF32_ST_BIND(i) ((i) >> 4)
|
||||
#define ELF32_ST_MKBIND(i) ((i) << 4) /* just a helper */
|
||||
#define ELF32_ST_TYPE(i) ((i) & 0xf)
|
||||
#define ELF32_ST_INFO(b, i) (ELF_ST_MKBIND(b) + ELF_ST_TYPE(i))
|
||||
#define ELF32_ST_INFO(b, i) (ELF32_ST_MKBIND(b) + ELF32_ST_TYPE(i))
|
||||
|
||||
#define ELF64_ST_BIND(i) ELF32_ST_BIND(i)
|
||||
#define ELF64_ST_MKBIND(i) ELF32_ST_MKBIND(i)
|
||||
|
@ -2118,20 +2118,7 @@ static void elf_section_header(int name, int type, uint64_t flags,
|
||||
elf_sects[elf_nsect].is_saa = is_saa;
|
||||
elf_nsect++;
|
||||
|
||||
if (is_elf32()) {
|
||||
fwriteint32_t((int32_t)name, ofile);
|
||||
fwriteint32_t((int32_t)type, ofile);
|
||||
fwriteint32_t((int32_t)flags, ofile);
|
||||
fwriteint32_t(0L, ofile); /* no address, ever, in object files */
|
||||
fwriteint32_t(type == 0 ? 0L : elf_foffs, ofile);
|
||||
fwriteint32_t(datalen, ofile);
|
||||
if (data)
|
||||
elf_foffs += ALIGN(datalen, SEC_FILEALIGN);
|
||||
fwriteint32_t((int32_t)link, ofile);
|
||||
fwriteint32_t((int32_t)info, ofile);
|
||||
fwriteint32_t((int32_t)align, ofile);
|
||||
fwriteint32_t((int32_t)eltsize, ofile);
|
||||
} else if (is_elfx32()) {
|
||||
if (is_elf32() || is_elfx32()) {
|
||||
fwriteint32_t((int32_t)name, ofile);
|
||||
fwriteint32_t((int32_t)type, ofile);
|
||||
fwriteint32_t((int32_t)flags, ofile);
|
||||
|
Loading…
Reference in New Issue
Block a user