gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Macros | Functions | Variables
exec_ecoff.test.cc File Reference
#include <gtest/gtest.h>
#include "base/loader/exec_ecoff.h"

Go to the source code of this file.

Macros

#define OMAGIC_STRUCT   (*((const ecoff_exechdr *)omagic))
 
#define NMAGIC_STRUCT   (*((const ecoff_exechdr *)nmagic))
 
#define ZMAGIC_STRUCT   (*((const ecoff_exechdr *)zmagic))
 
#define NO_MAGIC_STRUCT   (*((const ecoff_exechdr *)no_magic))
 

Functions

 TEST (ExecEcoffTest, Round)
 
 TEST (ExecEcoffTest, NoRounding)
 
 TEST (ExecEcoffTest, BlockAlignWithoutZmagic)
 
 TEST (ExecEcoffTest, BlockAlignWithZmagic)
 
 TEST (ExecEcoffTest, SegmentAlignWithZmagic)
 
 TEST (ExecEcoffTest, SegmentAlignWithoutZmagic)
 
 TEST (ExecEcoffTest, TxtOffWithMagic)
 
 TEST (ExecEcoffTest, TxtOffWithoutMagic)
 
 TEST (ExecEcoffTest, DatOffWithMagic)
 
 TEST (ExecEcoffTest, DatOffWithoutMagic)
 

Variables

const uint8_t zmagic []
 
const uint8_t nmagic []
 
const uint8_t omagic []
 

Macro Definition Documentation

◆ NMAGIC_STRUCT

#define NMAGIC_STRUCT   (*((const ecoff_exechdr *)nmagic))

Definition at line 37 of file exec_ecoff.test.cc.

Referenced by TEST().

◆ NO_MAGIC_STRUCT

#define NO_MAGIC_STRUCT   (*((const ecoff_exechdr *)no_magic))

Definition at line 39 of file exec_ecoff.test.cc.

◆ OMAGIC_STRUCT

#define OMAGIC_STRUCT   (*((const ecoff_exechdr *)omagic))

Definition at line 36 of file exec_ecoff.test.cc.

Referenced by TEST().

◆ ZMAGIC_STRUCT

#define ZMAGIC_STRUCT   (*((const ecoff_exechdr *)zmagic))

Definition at line 38 of file exec_ecoff.test.cc.

Referenced by TEST().

Function Documentation

◆ TEST() [1/10]

TEST ( ExecEcoffTest  ,
Round   
)

Definition at line 162 of file exec_ecoff.test.cc.

References ECOFF_ROUND, and EXPECT_EQ.

◆ TEST() [2/10]

TEST ( ExecEcoffTest  ,
NoRounding   
)

Definition at line 180 of file exec_ecoff.test.cc.

References ECOFF_ROUND, and EXPECT_EQ.

◆ TEST() [3/10]

TEST ( ExecEcoffTest  ,
BlockAlignWithoutZmagic   
)

Definition at line 187 of file exec_ecoff.test.cc.

References ECOFF_BLOCK_ALIGN, EXPECT_EQ, and OMAGIC_STRUCT.

◆ TEST() [4/10]

TEST ( ExecEcoffTest  ,
BlockAlignWithZmagic   
)

Definition at line 199 of file exec_ecoff.test.cc.

References ECOFF_BLOCK_ALIGN, EXPECT_EQ, and ZMAGIC_STRUCT.

◆ TEST() [5/10]

TEST ( ExecEcoffTest  ,
SegmentAlignWithZmagic   
)

Definition at line 215 of file exec_ecoff.test.cc.

References ECOFF_SEGMENT_ALIGN, EXPECT_EQ, and ZMAGIC_STRUCT.

◆ TEST() [6/10]

TEST ( ExecEcoffTest  ,
SegmentAlignWithoutZmagic   
)

Definition at line 230 of file exec_ecoff.test.cc.

References ECOFF_SEGMENT_ALIGN, EXPECT_EQ, NMAGIC_STRUCT, and OMAGIC_STRUCT.

◆ TEST() [7/10]

TEST ( ExecEcoffTest  ,
TxtOffWithMagic   
)

Definition at line 254 of file exec_ecoff.test.cc.

References ECOFF_TXTOFF, EXPECT_EQ, and ZMAGIC_STRUCT.

◆ TEST() [8/10]

TEST ( ExecEcoffTest  ,
TxtOffWithoutMagic   
)

Definition at line 262 of file exec_ecoff.test.cc.

References ECOFF_ROUND, ECOFF_TXTOFF, EXPECT_EQ, NMAGIC_STRUCT, and OMAGIC_STRUCT.

◆ TEST() [9/10]

TEST ( ExecEcoffTest  ,
DatOffWithMagic   
)

Definition at line 294 of file exec_ecoff.test.cc.

References ECOFF_DATOFF, ECOFF_ROUND, ECOFF_TXTOFF, EXPECT_EQ, and ZMAGIC_STRUCT.

◆ TEST() [10/10]

TEST ( ExecEcoffTest  ,
DatOffWithoutMagic   
)

Definition at line 308 of file exec_ecoff.test.cc.

References ECOFF_DATOFF, ECOFF_TXTOFF, EXPECT_EQ, NMAGIC_STRUCT, and OMAGIC_STRUCT.

Variable Documentation

◆ nmagic

const uint8_t nmagic[]
Initial value:
= {
0x01, 0x08, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
0x01, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 62 of file exec_ecoff.test.cc.

◆ omagic

const uint8_t omagic[]
Initial value:
= {
0x01, 0x07, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 81 of file exec_ecoff.test.cc.

◆ zmagic

const uint8_t zmagic[]
Initial value:
= {
0x01, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}

Definition at line 43 of file exec_ecoff.test.cc.


Generated on Fri Feb 28 2020 16:27:06 for gem5 by doxygen 1.8.13