syslinux.ld: don't pad between .got and .data
[profile/ivi/syslinux.git] / extlinux / fat.h
1 #ifndef _H_FAT_
2 #define _H_FAT_
3
4 #define MSDOS_SUPER_MAGIC       0x4d44          /* MD */
5 #if 0
6 /* FAT bootsector format, also used by other disk-based derivatives */
7 struct boot_sector {
8     uint8_t bsJump[3];
9     char bsOemName[8];
10     uint16_t bsBytesPerSec;
11     uint8_t bsSecPerClust;
12     uint16_t bsResSectors;
13     uint8_t bsFATs;
14     uint16_t bsRootDirEnts;
15     uint16_t bsSectors;
16     uint8_t bsMedia;
17     uint16_t bsFATsecs;
18     uint16_t bsSecPerTrack;
19     uint16_t bsHeads;
20     uint32_t bsHiddenSecs;
21     uint32_t bsHugeSectors;
22
23     union {
24         struct {
25             uint8_t DriveNumber;
26             uint8_t Reserved1;
27             uint8_t BootSignature;
28             uint32_t VolumeID;
29             char VolumeLabel[11];
30             char FileSysType[8];
31             uint8_t Code[442];
32         } __attribute__ ((packed)) bs16;
33         struct {
34             uint32_t FATSz32; 
35             uint16_t ExtFlags;
36             uint16_t FSVer;
37             uint32_t RootClus;
38             uint16_t FSInfo;
39             uint16_t BkBootSec;
40             uint8_t Reserved0[12];
41             uint8_t DriveNumber;
42             uint8_t Reserved1;
43             uint8_t BootSignature;
44             uint32_t VolumeID;
45             char VolumeLabel[11];
46             char FileSysType[8];
47             uint8_t Code[414];
48         } __attribute__ ((packed)) bs32;
49     } __attribute__ ((packed));
50     
51     uint32_t NextSector;        /* Pointer to the first unused sector */
52     uint16_t MaxTransfer;       /* Max sectors per transfer */
53     uint16_t bsSignature;
54 } __attribute__ ((packed));
55
56 #define bsHead      bsJump
57 #define bsHeadLen   offsetof(struct boot_sector, bsOemName)
58 #define bsCode      bs32.Code   /* The common safe choice */
59 #define bsCodeLen   (offsetof(struct boot_sector, bsSignature) - \
60                      offsetof(struct boot_sector, bsCode))
61 #endif
62 #endif