The Witchcraft Compiler Collection

http://github.com/endrazine/wcc/

Contents

1

Data Structure Index

 

1

 

1.1

Data Structures .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1

2

File Index

 

 

3

 

2.1

File List

. . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3

3

Data Structure Documentation

5

 

3.1

breakpoint_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

 

3.1.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

 

3.1.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

 

 

3.1.2.1

backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

 

 

3.1.2.2

ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

 

 

3.1.2.3

weight . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

3.2

ctx_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

 

 

3.2.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

 

3.2.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

 

 

3.2.2.1

abfd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

 

 

3.2.2.2

archsz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

 

 

3.2.2.3

base_address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.4

binname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.5

corefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.6

fdout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.7

has_relativerelocations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.8

mphdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.9

mphnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.10

mshdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.11

mshnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.12

opt_arch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.13

opt_asmdebug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.14

opt_binname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

7

 

 

 

3.2.2.15

opt_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

 

 

 

3.2.2.16

opt_debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

iv

 

 

 

CONTENTS

 

 

3.2.2.17

opt_entrypoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.18

opt_exec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.19

opt_flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.20

opt_interp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.21

opt_original . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.22

opt_poison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.23

opt_reloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.24

opt_shared . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.25

opt_sstrip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.26

opt_static . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 8

 

 

3.2.2.27

opt_strip . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.28

opt_verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.29

phnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.30

shnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.31

start_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.32

start_shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.33

strndx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.34

strndx_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

 

3.2.2.35

strndx_len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

3.3

elfdata_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 9

 

3.3.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

3.3.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.1

base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.2

dyn_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.3

dyns . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.4

ehdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.5

et_dyn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.6

limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.7

link_map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.8

p_pltgot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.9

phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 10

 

 

3.3.2.10

r_debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

3.4

eps_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

 

3.4.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

 

3.4.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

 

 

3.4.2.1

addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

 

 

3.4.2.2

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

 

 

3.4.2.3

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

 

 

3.4.2.4

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

3.5

gimport_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 11

The Witchcraft Compiler Collection

CONTENTS

 

 

v

 

3.5.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

3.5.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

 

3.5.2.1

r . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

 

3.5.2.2

rtype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

 

3.5.2.3

sec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

 

3.5.2.4

sindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

 

3.5.2.5

sname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

3.6

help_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

3.6.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

 

3.6.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.6.2.1

descr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.6.2.2

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.6.2.3

proto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.6.2.4

protoprefix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.6.2.5

retval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

3.7

learn_key_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

3.7.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

3.7.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.7.2.1

targ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.7.2.2

tfunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

 

 

3.7.2.3

tlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

 

3.7.2.4

ttype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

 

3.7.2.5

tvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

3.8

learn_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

3.8.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

3.8.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

 

3.8.2.1

hh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

 

3.8.2.2

key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

 

3.8.2.3

toffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

3.9

linenoiseCompletions Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

 

3.9.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

 

3.9.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

 

 

3.9.2.1

cvec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

 

 

3.9.2.2

len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

3.10

lua_Debug Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

 

3.10.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

 

3.10.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

 

 

3.10.2.1

currentline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

 

 

3.10.2.2

event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

 

 

3.10.2.3

i_ci . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16

The Witchcraft Compiler Collection

vi

 

 

 

CONTENTS

 

 

3.10.2.4

istailcall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.5

isvararg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.6

lastlinedefined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.7

linedefined . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.8

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.9

namewhat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.10

nparams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.11

nups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.12

short_src . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 16

 

 

3.10.2.13

source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

 

3.10.2.14 what . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

3.11

luaL_Buffer Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

3.11.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

3.11.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

 

3.11.2.1

b . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

 

3.11.2.2

initb . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

 

3.11.2.3

L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

 

3.11.2.4

n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 17

 

 

3.11.2.5

size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

3.12

luaL_Reg Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

 

3.12.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

 

3.12.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

 

 

3.12.2.1

func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

 

 

3.12.2.2

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

3.13

luaL_Stream Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

 

3.13.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 18

 

3.13.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.13.2.1

closef . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.13.2.2

f . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

3.14

msec_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

3.14.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

3.14.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.14.2.1

data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.14.2.2

flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.14.2.3

len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.14.2.4

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 19

 

 

3.14.2.5

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 20

 

 

3.14.2.6

outoffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 20

 

 

3.14.2.7

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 20

 

 

3.14.2.8

s_bfd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 20

The Witchcraft Compiler Collection

CONTENTS

 

 

vii

 

 

3.14.2.9

s_elf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

3.15

mseg_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

 

3.15.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

 

3.15.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

 

 

3.15.2.1

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

 

 

3.15.2.2

p_align . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.3

p_filesz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.4

p_flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.5

p_memsz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.6

p_offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.7

p_paddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.8

p_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.9

p_vaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

 

3.15.2.10 prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

3.16

preload_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

3.16.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

3.16.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

 

3.16.2.1

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

 

3.16.2.2

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

 

3.16.2.3

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

3.17

range_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

3.17.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

3.17.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

 

3.17.2.1

max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

 

3.17.2.2

min . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

3.18

script_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

3.18.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

3.18.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

 

3.18.2.1

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

 

3.18.2.2

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

 

3.18.2.3

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

3.19

section Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

 

3.19.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

3.19.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

 

3.19.2.1

end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

 

3.19.2.2

hperms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

 

3.19.2.3

init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

 

3.19.2.4

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

 

3.19.2.5

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

 

3.19.2.6

num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

The Witchcraft Compiler Collection

viii

 

 

 

CONTENTS

 

 

3.19.2.7

perms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 24

 

 

3.19.2.8

proba . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 24

 

 

3.19.2.9

probableval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 24

 

 

3.19.2.10 size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 24

3.20

sections_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

3.20.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

3.20.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.1

addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.2

flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.3

libname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.4

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.5

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.6

perms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.7

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 25

 

 

3.20.2.8

size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

3.21

segments_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

3.21.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

3.21.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

 

3.21.2.1

addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

 

3.21.2.2

flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

 

3.21.2.3

libname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

 

3.21.2.4

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

 

3.21.2.5

perms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 26

 

 

3.21.2.6

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

 

3.21.2.7

size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

 

3.21.2.8

type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

3.22

signame_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

3.22.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

3.22.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

 

3.22.2.1

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

 

3.22.2.2

signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

3.23

symaddr Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 27

 

3.23.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

 

3.23.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

 

 

3.23.2.1

addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

 

 

3.23.2.2

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

 

 

3.23.2.3

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

3.24

symbols_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

 

3.24.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

 

3.24.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 28

The Witchcraft Compiler Collection

CONTENTS

 

 

ix

 

 

3.24.2.1

addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

 

 

3.24.2.2

hbind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.3

htype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.4

libname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.5

next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.6

prev . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.7

size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.8

symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

 

3.24.2.9

value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

3.25

tuple_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

3.25.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

 

3.25.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

 

 

3.25.2.1

addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

 

 

3.25.2.2

name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

3.26

wsh_t Struct Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

 

3.26.1

Detailed Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

3.26.2

Field Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.1

bp_array . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.2

bp_num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.3

bp_points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.4

btcaller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.5

eps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.6

errcontext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

 

 

3.26.2.7

faultaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.8

firstcontext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.9

firsterrno . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.10

firstsicode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.11

firstsignal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.12

globalsignals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.13

interrupted . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.14

is_stdinscript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.15

L . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.16

learnfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.17

learnlog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.18

longjmp_ptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

32

 

 

3.26.2.19

longjmp_ptr_high . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

 

 

3.26.2.20

longjmp_ptr_high_cnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

 

 

3.26.2.21

mainhandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

 

 

3.26.2.22

opt_argc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

 

 

3.26.2.23

opt_argv . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

33

The Witchcraft Compiler Collection

x

 

CONTENTS

3.26.2.24 opt_hollywood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.25 opt_rescan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.26 opt_verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.27 opt_verbosetrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.28 phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.29 pltgot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.30 pltsz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 33

3.26.2.31 preload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.32 reason . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.33 script_argnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.34 script_args . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.35 scriptfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.36 scriptname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.37 scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.38 shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.39 sigbus_count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.40 sigbus_hash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.41 singlebranch_count . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.42 singlebranch_hash . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 34

3.26.2.43 singlestep_count . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.44 singlestep_hash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.45 symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.46 totsignals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.47 trace_rtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.48 trace_singlebranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.49 trace_singlestep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.50 trace_strace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

3.26.2.51 trace_unaligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 35

4 File Documentation

 

37

4.1 wcc/wcc.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 37

4.1.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 40

4.1.1.1 __USE_GNU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 40

4.1.1.2 _GNU_SOURCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 40

4.1.1.3

CS_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 41

4.1.1.4 DEFAULT_STRNDX_SIZE . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 41

4.1.1.5

Elf_Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 41

4.1.1.6

Elf_Ehdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 41

4.1.1.7

Elf_Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 41

4.1.1.8

Elf_Phdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 41

The Witchcraft Compiler Collection

CONTENTS

 

 

xi

 

4.1.1.9

ELF_R_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

 

4.1.1.10

ELF_R_SYM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

 

4.1.1.11

ELF_R_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

 

4.1.1.12

Elf_Rel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

 

4.1.1.13

Elf_Rela . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

 

4.1.1.14

Elf_Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

 

4.1.1.15

Elf_Shdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.16

ELF_ST_BIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.17

ELF_ST_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.18

Elf_Sword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.19

Elf_Sym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.20

Elf_Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.21

Elf_Xword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.22

ELFCLASS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.23

ELFMACHINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.24

elis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.25

EXTRA_CREATED_SECTIONS . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.26

FLAG_BSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

 

4.1.1.27

FLAG_NOBIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.28

FLAG_NOWRITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.29

FLAG_TEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.30

ifis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.31

MAXPADLEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.32

nullstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.33

RELOC_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.34

RELOC_X86_32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.1.35

RELOC_X86_64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.1.2

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.2.1

ctx_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.2.2

gimport_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.2.3

msec_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

 

4.1.2.4

mseg_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

4.1.3

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.1

add_extra_symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.2

add_symaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.3

adjust_baseaddress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.4

alignfromname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.5

alloc_phdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.6

analyze_text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

 

4.1.3.7

append_reloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

The Witchcraft Compiler Collection

xii

 

CONTENTS

4.1.3.8

append_strtab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 44

4.1.3.9

append_sym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 44

4.1.3.10

check_global_import . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.11

copy_body . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.12

craft_section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.13

create_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.14

ctx_getopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.15

ctx_init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.16

desired_arch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.17

entszfromname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.18

fixup_strtab_and_symtab . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.19

fixup_symtab_section_index . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 45

4.1.3.20

fixup_text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 46

4.1.3.21

flags_from_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 46

4.1.3.22

hexdump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 46

4.1.3.23

info_from_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 46

4.1.3.24

internal_function_store . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 46

4.1.3.25

libify . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 46

4.1.3.26

link_from_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.27

load_binary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.28

main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.29

max . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.30

merge_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.31

mk_section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.32

open_best . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 47

4.1.3.33

open_target . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.34

patch_symbol_index . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.35

pflag_from_section . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.36

phdr_cmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.37

phdr_cmp_premerge . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.38

print_bfd_sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.39

print_maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.40

print_msec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.41

print_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.42

protect_perms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 48

4.1.3.43

ptype_from_section . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 49

4.1.3.44

rd_sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 49

4.1.3.45

rd_symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 49

4.1.3.46

rd_symtab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 49

4.1.3.47

reloc_htype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 49

The Witchcraft Compiler Collection

CONTENTS

 

xiii

4.1.3.48

reloc_htype_x86_32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.1.3.49

reloc_htype_x86_64 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.1.3.50

rm_section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.1.3.51

save_dynstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.1.3.52

save_dynsym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

4.1.3.53

save_global_import . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.54

save_reloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.55

sec_name_from_index_after_strip . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.56

secindex_from_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.57

secindex_from_name_after_strip . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.58

section_from_addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.59

section_from_index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.60

section_from_name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.61

sort_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.62

sort_phdrs_premerge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

4.1.3.63

strip_binary_reloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.3.64

typefromname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.3.65

usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4 Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.1

allowed_sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.2

blnames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.3

datavma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.4

deltastrtab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.5

gimports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.6

gimportslen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

4.1.4.7

globalreloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.8

globalreloclen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.9

globalrelocoffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.10

globalstrtab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.11

globalstrtablen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.12

globalstrtableoffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.13

globalsymindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.14

globalsymtab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.15

globalsymtablen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.16

globalsymtableoffset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.17

maxdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.18

maxnewsec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

4.1.4.19

maxoldsec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.1.4.20

maxtext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

4.1.4.21

mindata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

The Witchcraft Compiler Collection

xiv

 

 

 

CONTENTS

 

 

4.1.4.22

mintext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 53

 

 

4.1.4.23

orig_sz . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 53

 

 

4.1.4.24

orig_text . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 53

 

 

4.1.4.25

symaddrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 53

 

 

4.1.4.26

textvma . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 53

4.2

wld/wld.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 53

 

4.2.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

 

 

4.2.1.1

DEFAULT_NAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

 

4.2.2

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

 

 

4.2.2.1

main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

 

 

4.2.2.2

mk_lib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

 

 

4.2.2.3

print_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

4.3

wsh/helper.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 54

 

4.3.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.1.1

_FILE_OFFSET_BITS . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.1.2

_XOPEN_SOURCE . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.1.3

HAS_ZFIRST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

4.3.2

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.2.1

is_mapped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.2.2

read_maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

4.3.3

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.3.1

lastsignal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.3.2

nsections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 55

 

 

4.3.3.3

zfirst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

4.4

wsh/include/colors.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

4.4.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.1

BLACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.2

BLUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.3

BROWN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.4

CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.5

CYAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.6

DARKGRAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.7

GRAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 56

 

 

4.4.1.8

GREEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 57

 

 

4.4.1.9

MAGENTA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 57

 

 

4.4.1.10

NORMAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 57

 

 

4.4.1.11

RED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 57

 

 

4.4.1.12

YELLOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 57

4.5

wsh/include/lauxlib.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 57

 

4.5.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 59

The Witchcraft Compiler Collection

CONTENTS

 

 

xv

 

4.5.1.1

LUA_ERRFILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.2

LUA_FILEHANDLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.3

LUA_NOREF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.4

LUA_REFNIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.5

lua_writeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.6

lua_writestring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.7

lua_writestringerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.8

luaL_addchar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.9

luaL_addsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

 

4.5.1.10

luaL_argcheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.11

luaL_checkstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.12

luaL_checkversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.13

luaL_dofile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.14

luaL_dostring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.15

luaL_getmetatable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.16

luaL_loadbuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.17

luaL_loadfile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.18

luaL_newlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.19

luaL_newlibtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.20

LUAL_NUMSIZES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.21

luaL_opt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

 

4.5.1.22

luaL_optstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.1.23

luaL_prepbuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.1.24

luaL_typename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

4.5.2

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.2.1

luaL_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.2.2

luaL_Reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.2.3

luaL_Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

4.5.3

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.1

luaL_addlstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.2

luaL_addstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.3

luaL_addvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.4

luaL_argerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.5

luaL_buffinit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.6

luaL_buffinitsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.7

luaL_callmeta . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.8

luaL_checkany . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.9

luaL_checkinteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.10

luaL_checklstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

 

4.5.3.11

luaL_checknumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

The Witchcraft Compiler Collection

xvi

 

 

 

CONTENTS

 

 

4.5.3.12

luaL_checkoption . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 61

 

 

4.5.3.13

luaL_checkstack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 61

 

 

4.5.3.14

luaL_checktype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 61

 

 

4.5.3.15

luaL_checkudata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 61

 

 

4.5.3.16

luaL_checkversion_ . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 61

 

 

4.5.3.17

luaL_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.18

luaL_execresult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.19

luaL_fileresult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.20

luaL_getmetafield . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.21

luaL_getsubtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.22

luaL_gsub . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.23

luaL_len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.24

luaL_loadbufferx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.25

luaL_loadfilex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.26

luaL_loadstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.27

luaL_newmetatable . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.28

luaL_newstate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.29

luaL_optinteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.30

luaL_optlstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.31

luaL_optnumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.32

luaL_prepbuffsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.33

luaL_pushresult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.34

luaL_pushresultsize . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.35

luaL_ref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.36

luaL_requiref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.37

luaL_setfuncs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.38

luaL_setmetatable . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.39

luaL_testudata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.40

luaL_tolstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.41

luaL_traceback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.42

luaL_unref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

 

 

4.5.3.43

luaL_where . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 62

4.6

wsh/include/libwitch/helper.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

 

4.6.1

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

 

 

4.6.1.1

is_mapped . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

 

 

4.6.1.2

read_maps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

 

4.6.2

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

 

 

4.6.2.1

nsections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

 

 

4.6.2.2

zfirst . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

4.7

wsh/include/libwitch/mylaux.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 63

The Witchcraft Compiler Collection

CONTENTS

 

 

xvii

 

4.7.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.1

luaL_argcheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.2

luaL_checkstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.3

luaL_dofile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.4

luaL_dostring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.5

luaL_getmetatable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.6

luaL_loadbuffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.7

luaL_newlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.8

luaL_newlibtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.9

luaL_opt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.10

luaL_optstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

 

 

4.7.1.11

luaL_typename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

4.8

wsh/include/libwitch/sigs.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

 

4.8.1

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

 

 

4.8.1.1

signame_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

 

4.8.2

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

 

 

4.8.2.1

signames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

4.9

wsh/include/libwitch/wsh.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

66

 

4.9.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.1

_GNU_SOURCE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.2

BIND_FLAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.3

DEFAULT_LEARN_FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.4

default_poison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.5

DEFAULT_SCRIPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.6

DEFAULT_SCRIPT_INDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.7

DMGL_ANSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.8

DMGL_ARM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.9

DMGL_PARAMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.10

ELF32_ST_BIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.11

ELF32_ST_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.12

ELF32_ST_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

 

 

4.9.1.13

ELF64_ST_BIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.14

ELF64_ST_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.15

ELF64_ST_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.16

Elf_Dyn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.17

Elf_Ehdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.18

Elf_Phdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.19

Elf_Shdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.20

Elf_Sym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

 

 

4.9.1.21

FAULT_EXEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

The Witchcraft Compiler Collection

xviii

 

CONTENTS

4.9.1.22

FAULT_READ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 71

4.9.1.23

FAULT_WRITE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 71

4.9.1.24

HPERMSMAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 71

4.9.1.25

LINES_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.26

luaL_reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.27

MAX_SIGNALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.28

MIN_BIN_SIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.29

MY_CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.30

PROC_ASLR_PATH . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.31

read_arg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.32

read_arg1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 72

4.9.1.33

read_arg2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 73

4.9.1.34

read_arg3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 73

4.9.1.35

read_arg4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.36

SHELL_HISTORY_NAME . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.37

SKIP_BOTTOM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.38

SKIP_INIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.39

STB_GLOBAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.40

STB_GNU_SECONDARY . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.41

STB_GNU_UNIQUE . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.42

STB_LOCAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 74

4.9.1.43

STB_WEAK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.44

STT_COMMON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.45

STT_FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.46

STT_FUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.47

STT_NOTYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.48

STT_OBJECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.49

STT_SECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.50

STT_TLS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.1.51

USE_LUA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.2 Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.2.1

breakpoint_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.2.2

eps_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.2.3

preload_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 75

4.9.2.4

range_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 76

4.9.2.5

script_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 76

4.9.2.6

sections_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 76

4.9.2.7

segments_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 76

4.9.2.8

symbols_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 76

4.9.2.9

tuple_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 76

The Witchcraft Compiler Collection

CONTENTS

 

xix

4.9.2.10

wsh_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

4.9.3 Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

4.9.3.1

add_symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

4.9.3.2

alloccharbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

4.9.3.3

bfmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

4.9.3.4

breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

4.9.3.5

bsspolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.6

cplus_demangle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.7

disable_aslr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.8

disable_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.9

do_loadlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.10

empty_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.11

empty_shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.12

enable_aslr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

4.9.3.13

enable_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.14

entrypoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.15

execlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.16

gencore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.17

getcharbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.18

getsize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.19

grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.20

grepptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.21

headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.22

help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

4.9.3.23

hexdump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

79

4.9.3.24

hollywood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

79

4.9.3.25

info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

79

4.9.3.26

libcall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

79

4.9.3.27

loadbin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.28

ltrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.29

man . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.30

map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.31

newarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.32

phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.33

print_functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.34

print_libs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.35

print_objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

4.9.3.36

print_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

81

4.9.3.37

print_shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

81

4.9.3.38

print_symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

81

The Witchcraft Compiler Collection

xx

 

CONTENTS

4.9.3.39

print_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 81

4.9.3.40

priv_memcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 81

4.9.3.41

priv_strcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 81

4.9.3.42

priv_strcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 81

4.9.3.43

procmap_lua . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 81

4.9.3.44

prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 81

4.9.3.45

ralloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.46

rawmemaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.47

rawmemread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.48

rawmemstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.49

rawmemstrlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.50

rawmemusage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.51

rawmemwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.52

rdnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 82

4.9.3.53

rdstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.54

reload_elfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.55

rescan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.56

rtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.57

script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.58

segment_add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.59 set_align_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.60 set_branch_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.61 set_trace_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.62

setarray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.63

setcharbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 83

4.9.3.64

shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.65

sicode_strerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.66

signaltoname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.67

singlebranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.68

singlestep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.69

systrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.70

traceunaligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.71

unrtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.72 unset_align_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.73 unset_branch_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.74 unset_trace_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.75

unsinglebranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 84

4.9.3.76

unsinglestep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 85

4.9.3.77

unsystrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 85

4.9.3.78

untraceunaligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 85

The Witchcraft Compiler Collection

CONTENTS

 

 

xxi

 

 

4.9.3.79

unverbosetrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.80

usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.81

verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.82

verbosetrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.83

wsh_getopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.84

wsh_init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.85

wsh_loadlibs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.86

wsh_run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

 

 

4.9.3.87

xalloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.9.3.88

xfree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

4.9.4

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.9.4.1

__progname_full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

4.10

wsh/include/libwitch/wsh_functions.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

4.10.1

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.10.1.1

default_options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.10.1.2

exposed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.10.1.3

global_xalloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.10.1.4

lua_blacklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

 

 

4.10.1.5

lua_default_functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

 

 

4.10.1.6

ranges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

4.11

wsh/include/linenoise.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

 

4.11.1

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.1.1

linenoiseCompletionCallback . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.1.2

linenoiseCompletions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

4.11.2

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.1

linenoise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.2

linenoiseAddCompletion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.3

linenoiseClearScreen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.4

linenoiseHistoryAdd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.5

linenoiseHistoryLoad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.6

linenoiseHistorySave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.7

linenoiseHistorySetMaxLen . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.8

linenoisePrintKeyCodes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.9

linenoiseSetCompletionCallback . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

 

4.11.2.10 linenoiseSetMultiLine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

4.12

wsh/include/longjmp.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

 

4.12.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

 

 

4.12.1.1

CATCH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

 

 

4.12.1.2

ETRY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

 

 

4.12.1.3

FINALLY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

The Witchcraft Compiler Collection

xxii

 

CONTENTS

4.12.1.4

THROW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 89

4.12.1.5

TRY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 89

4.13 wsh/include/lua.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 89

4.13.1 Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 93

4.13.1.1

LUA_AUTHORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 93

4.13.1.2

lua_call . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 93

4.13.1.3

LUA_COPYRIGHT . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 93

4.13.1.4

LUA_ERRERR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 93

4.13.1.5

LUA_ERRGCMM . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.6

LUA_ERRMEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.7

LUA_ERRRUN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.8

LUA_ERRSYNTAX . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.9

LUA_GCCOLLECT . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.10

LUA_GCCOUNT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.11

LUA_GCCOUNTB . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.12

LUA_GCISRUNNING . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.13

LUA_GCRESTART . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.14

LUA_GCSETPAUSE . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.15

LUA_GCSETSTEPMUL . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.16

LUA_GCSTEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 94

4.13.1.17

LUA_GCSTOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.18

lua_getextraspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.19

LUA_HOOKCALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.20

LUA_HOOKCOUNT . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.21

LUA_HOOKLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.22

LUA_HOOKRET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.23

LUA_HOOKTAILCALL . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.24

lua_insert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.25

lua_isboolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.26

lua_isfunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.27

lua_islightuserdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.28

lua_isnil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 95

4.13.1.29

lua_isnone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.30

lua_isnoneornil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.31

lua_istable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.32

lua_isthread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.33

LUA_MASKCALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.34

LUA_MASKCOUNT . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.35

LUA_MASKLINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

4.13.1.36

LUA_MASKRET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 96

The Witchcraft Compiler Collection

CONTENTS

xxiii

4.13.1.37 LUA_MINSTACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

4.13.1.38 LUA_MULTRET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

4.13.1.39 lua_newtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

4.13.1.40 LUA_NUMTAGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

96

4.13.1.41 LUA_OK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.42 LUA_OPADD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.43 LUA_OPBAND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.44 LUA_OPBNOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.45 LUA_OPBOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.46 LUA_OPBXOR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.47 LUA_OPDIV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.48 LUA_OPEQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.49 LUA_OPIDIV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.50 LUA_OPLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.51 LUA_OPLT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.52 LUA_OPMOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

4.13.1.53 LUA_OPMUL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.54 LUA_OPPOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.55 LUA_OPSHL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.56 LUA_OPSHR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.57 LUA_OPSUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.58 LUA_OPUNM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.59 lua_pcall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.60 lua_pop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.61 lua_pushcfunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.62 lua_pushglobaltable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.63 lua_pushliteral . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.64 lua_register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.13.1.65 LUA_REGISTRYINDEX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.66 LUA_RELEASE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.67 lua_remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.68 lua_replace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.69 LUA_RIDX_GLOBALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.70 LUA_RIDX_LAST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.71 LUA_RIDX_MAINTHREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.72 LUA_SIGNATURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.73 LUA_TBOOLEAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.74 LUA_TFUNCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.75 LUA_TLIGHTUSERDATA . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

4.13.1.76 LUA_TNIL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

The Witchcraft Compiler Collection

xxiv

 

 

CONTENTS

 

4.13.1.77 LUA_TNONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.78 LUA_TNUMBER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.79 lua_tointeger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.80 lua_tonumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.81 lua_tostring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.82 LUA_TSTRING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.83 LUA_TTABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.84 LUA_TTHREAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.85 LUA_TUSERDATA . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.86 lua_upvalueindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.87 LUA_VERSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.88 LUA_VERSION_MAJOR . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 100

 

4.13.1.89 LUA_VERSION_MINOR . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.1.90 LUA_VERSION_NUM . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.1.91 LUA_VERSION_RELEASE . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.1.92 LUA_YIELD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.1.93 lua_yield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

4.13.2

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.1

lua_Alloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.2

lua_CFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.3

lua_Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.4

lua_Hook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.5

lua_Integer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.6

lua_KContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.7

lua_KFunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 101

 

4.13.2.8

lua_Number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.2.9

lua_Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.2.10

lua_State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.2.11

lua_Unsigned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.2.12 lua_Writer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

4.13.3

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.1

lua_absindex . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.2

lua_arith . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.3

lua_atpanic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.4

lua_callk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.5

lua_checkstack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.6

lua_close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.7

lua_compare . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.8

lua_concat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

 

4.13.3.9

lua_copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 102

The Witchcraft Compiler Collection

CONTENTS

xxv

4.13.3.10 lua_createtable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

102

4.13.3.11 lua_dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

102

4.13.3.12 lua_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

102

4.13.3.13 lua_gc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

102

4.13.3.14 lua_getallocf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

102

4.13.3.15 lua_getfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

102

4.13.3.16 lua_getglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.17 lua_gethook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.18 lua_gethookcount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.19 lua_gethookmask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.20 lua_geti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.21 lua_getinfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.22 lua_getlocal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.23 lua_getmetatable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.24 lua_getstack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.25 lua_gettable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.26 lua_gettop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.27 lua_getupvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.28 lua_getuservalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.29 lua_iscfunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.30 lua_isinteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.31 lua_isnumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.32 lua_isstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.33 lua_isuserdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.34 lua_isyieldable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.35 lua_len . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.36 lua_load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.37 lua_newstate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.38 lua_newthread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.39 lua_newuserdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.40 lua_next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.41 lua_pcallk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.42 lua_pushboolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

4.13.3.43 lua_pushcclosure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

4.13.3.44 lua_pushfstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

4.13.3.45 lua_pushinteger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

4.13.3.46 lua_pushlightuserdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

4.13.3.47 lua_pushlstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

4.13.3.48 lua_pushnil . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

4.13.3.49 lua_pushnumber . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

The Witchcraft Compiler Collection

xxvi

CONTENTS

4.13.3.50 lua_pushstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.51 lua_pushthread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.52 lua_pushvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.53 lua_pushvfstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.54 lua_rawequal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.55 lua_rawget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.56 lua_rawgeti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.57 lua_rawgetp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.58 lua_rawlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.59 lua_rawset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.60 lua_rawseti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.61 lua_rawsetp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.62 lua_resume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.63 lua_rotate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.64 lua_setallocf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.65 lua_setfield . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.66 lua_setglobal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.67 lua_sethook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.68 lua_seti . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.69 lua_setlocal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.70 lua_setmetatable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 104

4.13.3.71 lua_settable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.72 lua_settop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.73 lua_setupvalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.74 lua_setuservalue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.75 lua_status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.76 lua_stringtonumber . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.77 lua_toboolean . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.78 lua_tocfunction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.79 lua_tointegerx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.80 lua_tolstring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.81 lua_tonumberx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.82 lua_topointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.83 lua_tothread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.84 lua_touserdata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.85 lua_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.86 lua_typename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.87 lua_upvalueid . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.88 lua_upvaluejoin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

4.13.3.89 lua_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 105

The Witchcraft Compiler Collection

CONTENTS

 

 

xxvii

 

4.13.3.90 lua_xmove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

 

4.13.3.91 lua_yieldk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

4.13.4

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

 

4.13.4.1

lua_ident . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

4.14 wsh/include/luaconf.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

4.14.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

106

 

4.14.1.1

l_floor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

106

 

4.14.1.2

l_mathlim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.3

l_mathop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.4

l_sprintf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.5

LUA_API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.6

LUA_CDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.7

LUA_CPATH_DEFAULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.8

LUA_DIRSEP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.9

LUA_EXTRASPACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.10

LUA_FLOAT_DOUBLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.11

LUA_FLOAT_FLOAT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.12

LUA_FLOAT_LONGDOUBLE . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.13

LUA_FLOAT_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

 

4.14.1.14

lua_getlocaledecpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.15

LUA_IDSIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.16

LUA_INT_INT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.17

LUA_INT_LONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.18

LUA_INT_LONGLONG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.19

LUA_INT_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.20

lua_integer2str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.21

LUA_INTEGER_FMT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.22

LUA_KCONTEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.23

LUA_LDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.24

LUA_NUMBER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.25

lua_number2str . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

 

4.14.1.26

lua_number2strx . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.27

LUA_NUMBER_FMT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.28

LUA_NUMBER_FRMLEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.29

lua_numbertointeger . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.30

LUA_PATH_DEFAULT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.31

LUA_QL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.32

LUA_QS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.33

LUA_ROOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

 

4.14.1.34

lua_str2number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

The Witchcraft Compiler Collection

xxviii

 

 

 

CONTENTS

 

 

4.14.1.35 lua_strx2number . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 109

 

 

4.14.1.36 LUA_UNSIGNED . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.37 LUA_VDIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.38 LUAI_BITSINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.39 LUAI_DDEC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.40 LUAI_DDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.41 LUAI_FUNC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.42 LUAI_MAXSTACK . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.43 LUAI_UACINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.44 LUAI_UACNUMBER . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.45 LUAL_BUFFERSIZE . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.46 LUALIB_API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

 

 

4.14.1.47 LUAMOD_API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 110

4.15

wsh/include/lualib.h File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 111

 

4.15.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 111

 

 

4.15.1.1

lua_assert . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 111

 

 

4.15.1.2

LUA_BITLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 111

 

 

4.15.1.3

LUA_COLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 111

 

 

4.15.1.4

LUA_DBLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 111

 

 

4.15.1.5

LUA_IOLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.1.6

LUA_LOADLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.1.7

LUA_MATHLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.1.8

LUA_OSLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.1.9

LUA_STRLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.1.10

LUA_TABLIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.1.11 LUA_UTF8LIBNAME . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

4.15.2

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.1

luaL_openlibs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.2

luaopen_base . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.3

luaopen_bit32 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.4

luaopen_coroutine . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.5

luaopen_debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.6

luaopen_io . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.7

luaopen_math . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.8

luaopen_os . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.9

luaopen_package . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.10

luaopen_string . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.11

luaopen_table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 112

 

 

4.15.2.12 luaopen_utf8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 113

4.16

wsh/wsh.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 113

The Witchcraft Compiler Collection

CONTENTS

 

 

xxix

4.16.1

Macro Definition Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

116

 

4.16.1.1

CS_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

116

 

4.16.1.2

Elf_Addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.3

Elf_Ehdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.4

Elf_Off . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.5

Elf_Phdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.6

ELF_R_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.7

ELF_R_SYM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.8

ELF_R_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.9

Elf_Rel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.10

Elf_Rela . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.11

Elf_Section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.12

Elf_Shdr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.13

ELF_ST_BIND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

 

4.16.1.14

ELF_ST_TYPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.15

Elf_Sword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.16

Elf_Sym . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.17

Elf_Word . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.18

Elf_Xword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.19

ELFCLASS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.20

ELFMACHINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.21

REG_RIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

 

4.16.1.22 RELOC_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

4.16.2

Typedef Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.2.1

help_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.2.2

learn_key_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.2.3

learn_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

4.16.3

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.1

_exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.2

add_binary_preload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.3

add_script_arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.4

add_script_exec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.5

add_symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.6

affinity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.7

alarmhandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

 

4.16.3.8

alloccharbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

 

4.16.3.9

bfmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

 

4.16.3.10

breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

 

4.16.3.11

bsspolute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

 

4.16.3.12

btr_disable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

The Witchcraft Compiler Collection

xxx

CONTENTS

4.16.3.13 btr_enable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 120

4.16.3.14 bushandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 120

4.16.3.15 completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 120

4.16.3.16 declare_func . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.17 declare_internals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.18 declare_num . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.19 decode_flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.20 decode_type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.21 detailed_help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.22 disable_aslr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.23 disable_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.24 do_loadlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 121

4.16.3.25 empty_eps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.26 empty_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.27 empty_shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.28 empty_symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.29 enable_aslr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.30 enable_core . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.31 entry_point_add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.32 entrypoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.33 execlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.34 exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 122

4.16.3.35 exit_group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.36 fatal_error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.37 gencore . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.38 getcharbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.39 grep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.40 grepptr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.41 headers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.42 help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.43 hexdump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 123

4.16.3.44 hollywood . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 124

4.16.3.45 info . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 124

4.16.3.46 info_function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 124

4.16.3.47 inthandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 124

4.16.3.48 learn_proto . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 124

4.16.3.49 libcall . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 124

4.16.3.50 loadbin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 125

4.16.3.51 loadlibrary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 125

4.16.3.52 ltrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 125

The Witchcraft Compiler Collection

CONTENTS

xxxi

4.16.3.53 lua_strerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

4.16.3.54 man . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

4.16.3.55 map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

4.16.3.56 mk_backtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

4.16.3.57 parse_dyn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

4.16.3.58 parse_link_map_dyn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.59 phdr_callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.60 phdr_cmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.61 phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.62 print_backtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.63 print_eps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.64 print_functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.65 print_libs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.66 print_objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

4.16.3.67 print_phdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.68 print_procmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.69 print_shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.70 print_symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.71 printarg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.72 priv_memcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.73 priv_strcat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.74 priv_strcpy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.75 procmap_lua . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.76 prototypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

127

4.16.3.77 ptoh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.78 ralloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.79 rawmemaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.80 rawmemread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.81 rawmemstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.82 rawmemstrlen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.83 rawmemusage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.84 rawmemwrite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

4.16.3.85 rdnum . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.86 rdstr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.87 read_elf_sig . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.88 reload_elfs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.89 rescan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.90 restore_exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.91 rtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

4.16.3.92 run_script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

The Witchcraft Compiler Collection

xxxii

CONTENTS

4.16.3.93 run_shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 129

4.16.3.94 scan_section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.95 scan_sections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.96 scan_symbol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.97 scan_syms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.98 script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.99 section_add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.100section_from_addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.101segment_add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 130

4.16.3.102segment_from_addr . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.103set_align_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.104set_alloc_opt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.105set_branch_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.106set_sighandlers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.107set_trace_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.108setcharbuf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.109shdr_callback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.110shdr_cmp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.111shdrs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.112sicode_strerror . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 131

4.16.3.113sicodetoname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.114sighandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.115signaltoname . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.116singlebranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.117singlestep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.118sort_learnt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.119symbol_from_addr . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.120symbol_from_name . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.121symbol_tobind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.122symbol_totype . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 132

4.16.3.123systrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.124test_stdin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.125traceback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.126traceunaligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.127traphandler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.128unrtrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.129unset_align_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.130unset_branch_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.131unset_trace_flag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

4.16.3.132unsinglebranch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . 133

The Witchcraft Compiler Collection

CONTENTS

 

 

xxxiii

 

4.16.3.133unsinglestep . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.134unsystrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.135untraceunaligned . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.136unverbosetrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.137verbose . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.138verbosetrace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.139wsh_getopt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.140wsh_init . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.141wsh_loadlibs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.142wsh_print_version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.143wsh_run . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

134

 

4.16.3.144wsh_usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

 

4.16.3.145xalloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

 

4.16.3.146xfree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

4.16.4

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

 

4.16.4.1

cmdhelp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

 

4.16.4.2

fcnhelp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

 

4.16.4.3

protorecords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

136

 

4.16.4.4

wsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

136

4.17 wsh/wshmain.c File Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137

4.17.1

Function Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137

 

4.17.1.1

main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137

4.17.2

Variable Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137

 

4.17.2.1

wsh . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137

Index

138

The Witchcraft Compiler Collection

Chapter 1

Data Structure Index

1.1 Data Structures

 

Here are the data structures with brief descriptions:

 

breakpoint_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

ctx_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5

elfdata_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

9

eps_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

gimport_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

help_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

learn_key_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

learn_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

linenoiseCompletions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

14

lua_Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15

luaL_Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

17

luaL_Reg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

luaL_Stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18

msec_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

19

mseg_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

preload_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

range_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

script_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

sections_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

segments_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

signame_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

symaddr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

symbols_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

tuple_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

29

wsh_t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

2

Data Structure Index

The Witchcraft Compiler Collection

Chapter 2

File Index

2.1 File List

 

Here is a list of all files with brief descriptions:

 

wcc/wcc.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

37

wld/wld.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

wsh/helper.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

wsh/wsh.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

113

wsh/wshmain.c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

137

wsh/include/colors.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

wsh/include/lauxlib.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

wsh/include/linenoise.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

wsh/include/longjmp.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

wsh/include/lua.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

wsh/include/luaconf.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

wsh/include/lualib.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

111

wsh/include/libwitch/helper.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

63

wsh/include/libwitch/mylaux.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

63

wsh/include/libwitch/sigs.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

wsh/include/libwitch/wsh.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

66

wsh/include/libwitch/wsh_functions.h . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

4

File Index

The Witchcraft Compiler Collection

Chapter 3

Data Structure Documentation

3.1 breakpoint_t Struct Reference

#include <wsh.h>

Data Fields

char  ptr

char backup

unsigned int weight

3.1.1Detailed Description

Breakpoint structure

Definition at line 442 of file wsh.h.

3.1.2Field Documentation

3.1.2.1char breakpoint_t::backup

Definition at line 444 of file wsh.h.

3.1.2.2char breakpoint_t::ptr

Definition at line 443 of file wsh.h.

3.1.2.3unsigned int breakpoint_t::weight

Definition at line 445 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.2 ctx_t Struct Reference

6

Data Structure Documentation

Data Fields

char  binname

unsigned int archsz

unsigned int shnum

unsigned int phnum

char  strndx

unsigned int strndx_len

unsigned int strndx_index

unsigned int start_shdrs

unsigned int start_phdrs

int fdout

bfd  abfd

unsigned int corefile

unsigned int base_address

msec_t  mshdrs

unsigned int mshnum

mseg_t  mphdrs

unsigned int mphnum

unsigned int has_relativerelocations

char  opt_binname

char  opt_interp

unsigned int opt_arch

unsigned int opt_static

unsigned int opt_reloc

unsigned int opt_strip

unsigned int opt_sstrip

unsigned int opt_exec

unsigned int opt_core

unsigned int opt_shared

unsigned int opt_verbose

unsigned long int opt_entrypoint

unsigned char opt_poison

unsigned int opt_original

unsigned int opt_debug

unsigned int opt_asmdebug

unsigned int opt_flags

3.2.1Detailed Description

Definition at line 264 of file wcc.c.

3.2.2Field Documentation

3.2.2.1bfd ctx_t::abfd

Definition at line 279 of file wcc.c.

3.2.2.2unsigned int ctx_t::archsz

Definition at line 270 of file wcc.c.

The Witchcraft Compiler Collection

3.2 ctx_t Struct Reference

7

3.2.2.3unsigned int ctx_t::base_address

Definition at line 283 of file wcc.c.

3.2.2.4char ctx_t::binname

Internal options

Definition at line 269 of file wcc.c.

3.2.2.5unsigned int ctx_t::corefile

Definition at line 280 of file wcc.c.

3.2.2.6int ctx_t::fdout

Definition at line 278 of file wcc.c.

3.2.2.7unsigned int ctx_t::has_relativerelocations

Definition at line 293 of file wcc.c.

3.2.2.8mseg_t ctx_t::mphdrs

Definition at line 290 of file wcc.c.

3.2.2.9unsigned int ctx_t::mphnum

Definition at line 291 of file wcc.c.

3.2.2.10msec_t ctx_t::mshdrs

Definition at line 286 of file wcc.c.

3.2.2.11unsigned int ctx_t::mshnum

Definition at line 287 of file wcc.c.

3.2.2.12unsigned int ctx_t::opt_arch

Definition at line 299 of file wcc.c.

3.2.2.13unsigned int ctx_t::opt_asmdebug

Definition at line 312 of file wcc.c.

3.2.2.14char ctx_t::opt_binname

User options

Definition at line 297 of file wcc.c.

The Witchcraft Compiler Collection

8

Data Structure Documentation

3.2.2.15unsigned int ctx_t::opt_core

Definition at line 305 of file wcc.c.

3.2.2.16unsigned int ctx_t::opt_debug

Definition at line 311 of file wcc.c.

3.2.2.17unsigned long int ctx_t::opt_entrypoint

Definition at line 308 of file wcc.c.

3.2.2.18unsigned int ctx_t::opt_exec

Definition at line 304 of file wcc.c.

3.2.2.19unsigned int ctx_t::opt_flags

Definition at line 313 of file wcc.c.

3.2.2.20char ctx_t::opt_interp

Definition at line 298 of file wcc.c.

3.2.2.21unsigned int ctx_t::opt_original

Definition at line 310 of file wcc.c.

3.2.2.22unsigned char ctx_t::opt_poison

Definition at line 309 of file wcc.c.

3.2.2.23unsigned int ctx_t::opt_reloc

Definition at line 301 of file wcc.c.

3.2.2.24unsigned int ctx_t::opt_shared

Definition at line 306 of file wcc.c.

3.2.2.25unsigned int ctx_t::opt_sstrip

Definition at line 303 of file wcc.c.

3.2.2.26unsigned int ctx_t::opt_static

Definition at line 300 of file wcc.c.

The Witchcraft Compiler Collection

3.3 elfdata_t Struct Reference

9

3.2.2.27unsigned int ctx_t::opt_strip

Definition at line 302 of file wcc.c.

3.2.2.28unsigned int ctx_t::opt_verbose

Definition at line 307 of file wcc.c.

3.2.2.29unsigned int ctx_t::phnum

Definition at line 272 of file wcc.c.

3.2.2.30unsigned int ctx_t::shnum

Definition at line 271 of file wcc.c.

3.2.2.31unsigned int ctx_t::start_phdrs

Definition at line 277 of file wcc.c.

3.2.2.32unsigned int ctx_t::start_shdrs

Definition at line 276 of file wcc.c.

3.2.2.33char ctx_t::strndx

Definition at line 273 of file wcc.c.

3.2.2.34unsigned int ctx_t::strndx_index

Definition at line 275 of file wcc.c.

3.2.2.35unsigned int ctx_t::strndx_len

Definition at line 274 of file wcc.c.

The documentation for this struct was generated from the following file:

wcc/wcc.c

3.3elfdata_t Struct Reference

#include <wsh.h>

Data Fields

bool et_dyn

Elf_Dyn  dyns

Elf_Ehdr  ehdr

Elf_Phdr  phdrs

The Witchcraft Compiler Collection

10

Data Structure Documentation

uint32_t dyn_index

uintptr_t base

uintptr_t limit

uintptr_t  p_pltgot

struct r_debug  r_debug

struct link_map  link_map

3.3.1Detailed Description

Internal representation of an ELF

Definition at line 417 of file wsh.h.

3.3.2Field Documentation

3.3.2.1uintptr_t elfdata_t::base

Definition at line 423 of file wsh.h.

3.3.2.2uint32_t elfdata_t::dyn_index

Definition at line 422 of file wsh.h.

3.3.2.3Elf_Dyn elfdata_t::dyns

Definition at line 419 of file wsh.h.

3.3.2.4Elf_Ehdr elfdata_t::ehdr

Definition at line 420 of file wsh.h.

3.3.2.5bool elfdata_t::et_dyn

Definition at line 418 of file wsh.h.

3.3.2.6uintptr_t elfdata_t::limit

Definition at line 423 of file wsh.h.

3.3.2.7struct link_map elfdata_t::link_map

Definition at line 426 of file wsh.h.

3.3.2.8uintptr_t elfdata_t::p_pltgot

Definition at line 424 of file wsh.h.

3.3.2.9Elf_Phdr elfdata_t::phdrs

Definition at line 421 of file wsh.h.

The Witchcraft Compiler Collection

3.4 eps_t Struct Reference

11

3.3.2.10struct r_debug elfdata_t::r_debug

Definition at line 425 of file wsh.h.

The documentation for this struct was generated from the following file:

wsh/include/libwitch/wsh.h

3.4eps_t Struct Reference

#include <wsh.h>

Data Fields

unsigned long int addr

char  name

struct eps_t  prev

struct eps_t  next

3.4.1Detailed Description

Definition at line 520 of file wsh.h.

3.4.2Field Documentation

3.4.2.1unsigned long int eps_t::addr

Definition at line 521 of file wsh.h.

3.4.2.2char eps_t::name

Definition at line 522 of file wsh.h.

3.4.2.3struct eps_t eps_t::next

Definition at line 525 of file wsh.h.

3.4.2.4struct eps_t eps_t::prev

Definition at line 524 of file wsh.h.

The documentation for this struct was generated from the following file:

wsh/include/libwitch/wsh.h

3.5gimport_t Struct Reference

Data Fields

• char  sname

The Witchcraft Compiler Collection

12

Data Structure Documentation

msec_t  sec

Elf_Rela  r

int rtype

unsigned int sindex

3.5.1Detailed Description

Definition at line 2770 of file wcc.c.

3.5.2Field Documentation

3.5.2.1Elf_Rela gimport_t::r

Definition at line 2773 of file wcc.c.

3.5.2.2int gimport_t::rtype

Definition at line 2774 of file wcc.c.

3.5.2.3msec_t gimport_t::sec

Definition at line 2772 of file wcc.c.

3.5.2.4unsigned int gimport_t::sindex

Definition at line 2775 of file wcc.c.

3.5.2.5char gimport_t::sname

Definition at line 2771 of file wcc.c.

The documentation for this struct was generated from the following file:

wcc/wcc.c

3.6help_t Struct Reference

Data Fields

char  name

char  proto

char  descr

char  protoprefix

char  retval

3.6.1Detailed Description

Definition at line 489 of file wsh.c.

The Witchcraft Compiler Collection

3.7 learn_key_t Struct Reference

13

3.6.2Field Documentation

3.6.2.1char help_t::descr

Definition at line 492 of file wsh.c.

3.6.2.2char help_t::name

Definition at line 490 of file wsh.c.

3.6.2.3char help_t::proto

Definition at line 491 of file wsh.c.

3.6.2.4char help_t::protoprefix

Definition at line 493 of file wsh.c.

3.6.2.5char help_t::retval

Definition at line 494 of file wsh.c.

The documentation for this struct was generated from the following file:

wsh/wsh.c

3.7learn_key_t Struct Reference

Data Fields

char ttype [10]

char tlib [200]

char tfunction [200]

char targ [20]

char tvalue [200]

3.7.1Detailed Description

Definition at line 1861 of file wsh.c.

3.7.2Field Documentation

3.7.2.1char learn_key_t::targ[20]

Definition at line 1866 of file wsh.c.

3.7.2.2char learn_key_t::tfunction[200]

Definition at line 1865 of file wsh.c.

The Witchcraft Compiler Collection

14

Data Structure Documentation

3.7.2.3char learn_key_t::tlib[200]

Definition at line 1864 of file wsh.c.

3.7.2.4char learn_key_t::ttype[10]

Definition at line 1863 of file wsh.c.

3.7.2.5char learn_key_t::tvalue[200]

Definition at line 1867 of file wsh.c.

The documentation for this struct was generated from the following file:

wsh/wsh.c

3.8learn_t Struct Reference

Data Fields

learn_key_t key

char toffset [20]

UT_hash_handle hh

3.8.1Detailed Description

Definition at line 1870 of file wsh.c.

3.8.2Field Documentation

3.8.2.1UT_hash_handle learn_t::hh

Definition at line 1873 of file wsh.c.

3.8.2.2learn_key_t learn_t::key

Definition at line 1871 of file wsh.c.

3.8.2.3char learn_t::toffset[20]

Definition at line 1872 of file wsh.c.

The documentation for this struct was generated from the following file:

wsh/wsh.c

3.9linenoiseCompletions Struct Reference

#include <linenoise.h>

The Witchcraft Compiler Collection

3.10 lua_Debug Struct Reference

15

Data Fields

size_t len

char  cvec

3.9.1Detailed Description

Definition at line 46 of file linenoise.h.

3.9.2Field Documentation

3.9.2.1char linenoiseCompletions::cvec

Definition at line 48 of file linenoise.h.

3.9.2.2size_t linenoiseCompletions::len

Definition at line 47 of file linenoise.h.

The documentation for this struct was generated from the following file:

• wsh/include/linenoise.h

3.10 lua_Debug Struct Reference

#include <lua.h>

Data Fields

int event

const char  name

const char  namewhat

const char  what

const char  source

int currentline

int linedefined

int lastlinedefined

unsigned char nups

unsigned char nparams

char isvararg

char istailcall

char short_src [LUA_IDSIZE]

struct CallInfo  i_ci

3.10.1Detailed Description

Definition at line 441 of file lua.h.

The Witchcraft Compiler Collection

16

Data Structure Documentation

3.10.2Field Documentation

3.10.2.1int lua_Debug::currentline

Definition at line 447 of file lua.h.

3.10.2.2int lua_Debug::event

Definition at line 442 of file lua.h.

3.10.2.3struct CallInfo lua_Debug::i_ci

Definition at line 456 of file lua.h.

3.10.2.4char lua_Debug::istailcall

Definition at line 453 of file lua.h.

3.10.2.5char lua_Debug::isvararg

Definition at line 452 of file lua.h.

3.10.2.6int lua_Debug::lastlinedefined

Definition at line 449 of file lua.h.

3.10.2.7int lua_Debug::linedefined

Definition at line 448 of file lua.h.

3.10.2.8const char lua_Debug::name

Definition at line 443 of file lua.h.

3.10.2.9const char lua_Debug::namewhat

Definition at line 444 of file lua.h.

3.10.2.10unsigned char lua_Debug::nparams

Definition at line 451 of file lua.h.

3.10.2.11unsigned char lua_Debug::nups

Definition at line 450 of file lua.h.

3.10.2.12char lua_Debug::short_src[LUA_IDSIZE]

Definition at line 454 of file lua.h.

The Witchcraft Compiler Collection

3.11 luaL_Buffer Struct Reference

17

3.10.2.13const char lua_Debug::source

Definition at line 446 of file lua.h.

3.10.2.14const char lua_Debug::what

Definition at line 445 of file lua.h.

The documentation for this struct was generated from the following file:

• wsh/include/lua.h

3.11 luaL_Buffer Struct Reference

#include <lauxlib.h>

Data Fields

char  b

size_t size

size_t n

lua_State  L

char initb [LUAL_BUFFERSIZE]

3.11.1Detailed Description

Definition at line 140 of file lauxlib.h.

3.11.2Field Documentation

3.11.2.1char luaL_Buffer::b

Definition at line 141 of file lauxlib.h.

3.11.2.2char luaL_Buffer::initb[LUAL_BUFFERSIZE]

Definition at line 145 of file lauxlib.h.

3.11.2.3lua_State luaL_Buffer::L

Definition at line 144 of file lauxlib.h.

3.11.2.4size_t luaL_Buffer::n

Definition at line 143 of file lauxlib.h.

The Witchcraft Compiler Collection

18

Data Structure Documentation

3.11.2.5size_t luaL_Buffer::size

Definition at line 142 of file lauxlib.h.

The documentation for this struct was generated from the following file:

• wsh/include/lauxlib.h

3.12 luaL_Reg Struct Reference

#include <lauxlib.h>

Data Fields

const char  name

lua_CFunction func

3.12.1Detailed Description

Definition at line 23 of file lauxlib.h.

3.12.2Field Documentation

3.12.2.1lua_CFunction luaL_Reg::func

Definition at line 25 of file lauxlib.h.

3.12.2.2const char luaL_Reg::name

Definition at line 24 of file lauxlib.h.

The documentation for this struct was generated from the following file:

• wsh/include/lauxlib.h

3.13 luaL_Stream Struct Reference

#include <lauxlib.h>

Data Fields

FILE  f

lua_CFunction closef

3.13.1Detailed Description

Definition at line 185 of file lauxlib.h.

The Witchcraft Compiler Collection

3.14 msec_t Struct Reference

19

3.13.2Field Documentation

3.13.2.1lua_CFunction luaL_Stream::closef

Definition at line 187 of file lauxlib.h.

3.13.2.2FILE luaL_Stream::f

Definition at line 186 of file lauxlib.h.

The documentation for this struct was generated from the following file:

• wsh/include/lauxlib.h

3.14 msec_t Struct Reference

Data Fields

char  name

unsigned long int len

unsigned char  data

char  outoffset

unsigned int flags

asection  s_bfd

Elf_Shdr  s_elf

struct msec_t  prev

struct msec_t  next

3.14.1Detailed Description

Meta section header

Definition at line 229 of file wcc.c.

3.14.2Field Documentation

3.14.2.1unsigned char msec_t::data

Definition at line 232 of file wcc.c.

3.14.2.2unsigned int msec_t::flags

Definition at line 234 of file wcc.c.

3.14.2.3unsigned long int msec_t::len

Definition at line 231 of file wcc.c.

3.14.2.4char msec_t::name

Definition at line 230 of file wcc.c.

The Witchcraft Compiler Collection

20

Data Structure Documentation

3.14.2.5struct msec_t msec_t::next

Definition at line 240 of file wcc.c.

3.14.2.6char msec_t::outoffset

Definition at line 233 of file wcc.c.

3.14.2.7struct msec_t msec_t::prev

Definition at line 239 of file wcc.c.

3.14.2.8asection msec_t::s_bfd

Definition at line 236 of file wcc.c.

3.14.2.9Elf_Shdr msec_t::s_elf

Definition at line 237 of file wcc.c.

The documentation for this struct was generated from the following file:

• wcc/wcc.c

3.15 mseg_t Struct Reference

Data Fields

Elf_Word p_type

Elf_Word p_flags

Elf_Off p_offset

Elf_Addr p_vaddr

Elf_Addr p_paddr

Elf_Xword p_filesz

Elf_Xword p_memsz

Elf_Xword p_align

struct msec_t  prev

struct msec_t  next

3.15.1Detailed Description

Meta segment header

Definition at line 248 of file wcc.c.

3.15.2Field Documentation

3.15.2.1struct msec_t mseg_t::next

Definition at line 259 of file wcc.c.

The Witchcraft Compiler Collection

3.16 preload_t Struct Reference

21

3.15.2.2Elf_Xword mseg_t::p_align

Definition at line 256 of file wcc.c.

3.15.2.3Elf_Xword mseg_t::p_filesz

Definition at line 254 of file wcc.c.

3.15.2.4Elf_Word mseg_t::p_flags

Definition at line 250 of file wcc.c.

3.15.2.5Elf_Xword mseg_t::p_memsz

Definition at line 255 of file wcc.c.

3.15.2.6Elf_Off mseg_t::p_offset

Definition at line 251 of file wcc.c.

3.15.2.7Elf_Addr mseg_t::p_paddr

Definition at line 253 of file wcc.c.

3.15.2.8Elf_Word mseg_t::p_type

Definition at line 249 of file wcc.c.

3.15.2.9Elf_Addr mseg_t::p_vaddr

Definition at line 252 of file wcc.c.

3.15.2.10struct msec_t mseg_t::prev

Definition at line 258 of file wcc.c.

The documentation for this struct was generated from the following file:

• wcc/wcc.c

3.16 preload_t Struct Reference

#include <wsh.h>

Data Fields

char  name

struct preload_t  prev

struct preload_t  next

The Witchcraft Compiler Collection

22

Data Structure Documentation

3.16.1Detailed Description

Libraries to be preloaded (before shell/script execution)

Definition at line 453 of file wsh.h.

3.16.2Field Documentation

3.16.2.1char preload_t::name

Definition at line 454 of file wsh.h.

3.16.2.2struct preload_t preload_t::next

Definition at line 457 of file wsh.h.

3.16.2.3struct preload_t preload_t::prev

Definition at line 456 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.17 range_t Struct Reference

#include <wsh.h>

Data Fields

unsigned long long int min

unsigned long long int max

3.17.1Detailed Description

Memory ranges

Definition at line 433 of file wsh.h.

3.17.2Field Documentation

3.17.2.1unsigned long long int range_t::max

Definition at line 435 of file wsh.h.

3.17.2.2unsigned long long int range_t::min

Definition at line 434 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

The Witchcraft Compiler Collection

3.18 script_t Struct Reference

23

3.18 script_t Struct Reference

#include <wsh.h>

Data Fields

char  name

struct preload_t  prev

struct preload_t  next

3.18.1Detailed Description

Scripts to be executed

Definition at line 464 of file wsh.h.

3.18.2Field Documentation

3.18.2.1char script_t::name

Definition at line 465 of file wsh.h.

3.18.2.2struct preload_t script_t::next

Definition at line 468 of file wsh.h.

3.18.2.3struct preload_t script_t::prev

Definition at line 467 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.19 section Struct Reference

#include <helper.h>

Data Fields

unsigned long long int init

unsigned long long int end

int size

int perms

char name [255]

char hperms [10]

void  next

int num

int proba

int probableval

The Witchcraft Compiler Collection

24

Data Structure Documentation

3.19.1Detailed Description

Definition at line 11 of file helper.h.

3.19.2Field Documentation

3.19.2.1unsigned long long int section::end

Definition at line 13 of file helper.h.

3.19.2.2char section::hperms[10]

Definition at line 17 of file helper.h.

3.19.2.3unsigned long long int section::init

Definition at line 12 of file helper.h.

3.19.2.4char section::name[255]

Definition at line 16 of file helper.h.

3.19.2.5void section::next

Definition at line 18 of file helper.h.

3.19.2.6int section::num

Definition at line 20 of file helper.h.

3.19.2.7int section::perms

Definition at line 15 of file helper.h.

3.19.2.8int section::proba

Definition at line 21 of file helper.h.

3.19.2.9int section::probableval

Definition at line 22 of file helper.h.

3.19.2.10int section::size

Definition at line 14 of file helper.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/helper.h

The Witchcraft Compiler Collection

3.20 sections_t Struct Reference

25

3.20 sections_t Struct Reference

#include <wsh.h>

Data Fields

unsigned long int addr

unsigned long int size

char  libname

char  name

char  perms

int flags

struct sections_t  prev

struct sections_t  next

3.20.1Detailed Description

Representation of ELF Sections

Definition at line 474 of file wsh.h.

3.20.2Field Documentation

3.20.2.1unsigned long int sections_t::addr

Definition at line 475 of file wsh.h.

3.20.2.2int sections_t::flags

Definition at line 480 of file wsh.h.

3.20.2.3char sections_t::libname

Definition at line 477 of file wsh.h.

3.20.2.4char sections_t::name

Definition at line 478 of file wsh.h.

3.20.2.5struct sections_t sections_t::next

Definition at line 483 of file wsh.h.

3.20.2.6char sections_t::perms

Definition at line 479 of file wsh.h.

3.20.2.7struct sections_t sections_t::prev

Definition at line 482 of file wsh.h.

The Witchcraft Compiler Collection

26

Data Structure Documentation

3.20.2.8unsigned long int sections_t::size

Definition at line 476 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.21 segments_t Struct Reference

#include <wsh.h>

Data Fields

unsigned long int addr

unsigned long int size

char  libname

char  type

char  perms

int flags

struct segments_t  prev

struct segments_t  next

3.21.1Detailed Description

Representation of ELF Segments

Definition at line 490 of file wsh.h.

3.21.2Field Documentation

3.21.2.1unsigned long int segments_t::addr

Definition at line 491 of file wsh.h.

3.21.2.2int segments_t::flags

Definition at line 496 of file wsh.h.

3.21.2.3char segments_t::libname

Definition at line 493 of file wsh.h.

3.21.2.4struct segments_t segments_t::next

Definition at line 499 of file wsh.h.

3.21.2.5char segments_t::perms

Definition at line 495 of file wsh.h.

The Witchcraft Compiler Collection

3.22 signame_t Struct Reference

27

3.21.2.6struct segments_t segments_t::prev

Definition at line 498 of file wsh.h.

3.21.2.7unsigned long int segments_t::size

Definition at line 492 of file wsh.h.

3.21.2.8char segments_t::type

Definition at line 494 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.22 signame_t Struct Reference

#include <sigs.h>

Data Fields

int signal

char  name

3.22.1Detailed Description

Definition at line 1 of file sigs.h.

3.22.2Field Documentation

3.22.2.1char signame_t::name

Definition at line 3 of file sigs.h.

3.22.2.2int signame_t::signal

Definition at line 2 of file sigs.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/sigs.h

3.23 symaddr Struct Reference

Data Fields

struct symaddr  next

char  name

int addr

The Witchcraft Compiler Collection

28

Data Structure Documentation

3.23.1Detailed Description

Definition at line 405 of file wcc.c.

3.23.2Field Documentation

3.23.2.1int symaddr::addr

Definition at line 408 of file wcc.c.

3.23.2.2char symaddr::name

Definition at line 407 of file wcc.c.

3.23.2.3struct symaddr symaddr::next

Definition at line 406 of file wcc.c.

The documentation for this struct was generated from the following file:

• wcc/wcc.c

3.24 symbols_t Struct Reference

#include <wsh.h>

Data Fields

unsigned long int addr

unsigned long int size

char  symbol

char  libname

char  htype

char  hbind

unsigned long int value

struct symbols_t  prev

struct symbols_t  next

3.24.1Detailed Description

Representation of ELF Symbols

Definition at line 506 of file wsh.h.

3.24.2Field Documentation

3.24.2.1unsigned long int symbols_t::addr

Definition at line 507 of file wsh.h.

The Witchcraft Compiler Collection

3.25 tuple_t Struct Reference

29

3.24.2.2char symbols_t::hbind

Definition at line 512 of file wsh.h.

3.24.2.3char symbols_t::htype

Definition at line 511 of file wsh.h.

3.24.2.4char symbols_t::libname

Definition at line 510 of file wsh.h.

3.24.2.5struct symbols_t symbols_t::next

Definition at line 516 of file wsh.h.

3.24.2.6struct symbols_t symbols_t::prev

Definition at line 515 of file wsh.h.

3.24.2.7unsigned long int symbols_t::size

Definition at line 508 of file wsh.h.

3.24.2.8char symbols_t::symbol

Definition at line 509 of file wsh.h.

3.24.2.9unsigned long int symbols_t::value

Definition at line 513 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.25 tuple_t Struct Reference

#include <wsh.h>

Data Fields

void  addr

char  name

3.25.1Detailed Description

Definition at line 610 of file wsh.h.

The Witchcraft Compiler Collection

30

Data Structure Documentation

3.25.2Field Documentation

3.25.2.1void tuple_t::addr

Definition at line 611 of file wsh.h.

3.25.2.2char tuple_t::name

Definition at line 612 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

3.26 wsh_t Struct Reference

#include <wsh.h>

Data Fields

lua_State  L

FILE  scriptfile

char  scriptname

char  learnlog

FILE  learnfile

unsigned int opt_verbose

unsigned int opt_hollywood

unsigned int mainhandle

unsigned int opt_rescan

unsigned int opt_verbosetrace

unsigned int firsterrno

unsigned int firstsicode

unsigned int firstsignal

unsigned int totsignals

unsigned int globalsignals

unsigned long int faultaddr

void  firstcontext

unsigned int reason

unsigned int is_stdinscript

unsigned int bp_points

void  pltgot

unsigned int pltsz

ucontext_t  errcontext

unsigned long int btcaller

breakpoint_t  bp_array

unsigned int bp_num

unsigned int opt_argc

char  opt_argv

char  script_args

unsigned int script_argnum

unsigned int trace_unaligned

unsigned int trace_singlestep

unsigned int trace_singlebranch

The Witchcraft Compiler Collection

3.26 wsh_t Struct Reference

31

unsigned int trace_rtrace

unsigned int trace_strace

unsigned int singlestep_count

unsigned int singlebranch_count

unsigned int sigbus_count

unsigned long long int singlestep_hash

unsigned long long int singlebranch_hash

unsigned long long int sigbus_hash

jmp_buf longjmp_ptr_high

jmp_buf longjmp_ptr

unsigned int interrupted

unsigned int longjmp_ptr_high_cnt

struct sections_t  shdrs

struct segments_t  phdrs

struct symbols_t  symbols

struct eps_t  eps

struct preload_t  preload

struct script_t  scripts

3.26.1Detailed Description

wsh context

Definition at line 532 of file wsh.h.

3.26.2Field Documentation

3.26.2.1breakpoint_t wsh_t::bp_array

Definition at line 570 of file wsh.h.

3.26.2.2unsigned int wsh_t::bp_num

Definition at line 571 of file wsh.h.

3.26.2.3unsigned int wsh_t::bp_points

Definition at line 560 of file wsh.h.

3.26.2.4unsigned long int wsh_t::btcaller

Definition at line 568 of file wsh.h.

3.26.2.5struct eps_t wsh_t::eps

Definition at line 603 of file wsh.h.

3.26.2.6ucontext_t wsh_t::errcontext

Definition at line 565 of file wsh.h.

The Witchcraft Compiler Collection

32

Data Structure Documentation

3.26.2.7unsigned long int wsh_t::faultaddr

Definition at line 554 of file wsh.h.

3.26.2.8void wsh_t::firstcontext

Definition at line 556 of file wsh.h.

3.26.2.9unsigned int wsh_t::firsterrno

Definition at line 549 of file wsh.h.

3.26.2.10unsigned int wsh_t::firstsicode

Definition at line 550 of file wsh.h.

3.26.2.11unsigned int wsh_t::firstsignal

Definition at line 551 of file wsh.h.

3.26.2.12unsigned int wsh_t::globalsignals

Definition at line 553 of file wsh.h.

3.26.2.13unsigned int wsh_t::interrupted

Definition at line 597 of file wsh.h.

3.26.2.14unsigned int wsh_t::is_stdinscript

Definition at line 559 of file wsh.h.

3.26.2.15lua_State wsh_t::L

Definition at line 535 of file wsh.h.

3.26.2.16FILE wsh_t::learnfile

Definition at line 540 of file wsh.h.

3.26.2.17char wsh_t::learnlog

Definition at line 539 of file wsh.h.

3.26.2.18jmp_buf wsh_t::longjmp_ptr

Definition at line 595 of file wsh.h.

The Witchcraft Compiler Collection

3.26 wsh_t Struct Reference

33

3.26.2.19jmp_buf wsh_t::longjmp_ptr_high

Definition at line 594 of file wsh.h.

3.26.2.20unsigned int wsh_t::longjmp_ptr_high_cnt

Definition at line 598 of file wsh.h.

3.26.2.21unsigned int wsh_t::mainhandle

Definition at line 544 of file wsh.h.

3.26.2.22unsigned int wsh_t::opt_argc

Definition at line 573 of file wsh.h.

3.26.2.23char wsh_t::opt_argv

Definition at line 574 of file wsh.h.

3.26.2.24unsigned int wsh_t::opt_hollywood

Definition at line 543 of file wsh.h.

3.26.2.25unsigned int wsh_t::opt_rescan

Definition at line 545 of file wsh.h.

3.26.2.26unsigned int wsh_t::opt_verbose

Definition at line 542 of file wsh.h.

3.26.2.27unsigned int wsh_t::opt_verbosetrace

Definition at line 547 of file wsh.h.

3.26.2.28struct segments_t wsh_t::phdrs

Definition at line 601 of file wsh.h.

3.26.2.29void wsh_t::pltgot

Definition at line 562 of file wsh.h.

3.26.2.30unsigned int wsh_t::pltsz

Definition at line 563 of file wsh.h.

The Witchcraft Compiler Collection

34

Data Structure Documentation

3.26.2.31struct preload_t wsh_t::preload

Definition at line 605 of file wsh.h.

3.26.2.32unsigned int wsh_t::reason

Definition at line 557 of file wsh.h.

3.26.2.33unsigned int wsh_t::script_argnum

Definition at line 577 of file wsh.h.

3.26.2.34char wsh_t::script_args

Definition at line 576 of file wsh.h.

3.26.2.35FILE wsh_t::scriptfile

Definition at line 536 of file wsh.h.

3.26.2.36char wsh_t::scriptname

Definition at line 537 of file wsh.h.

3.26.2.37struct script_t wsh_t::scripts

Definition at line 606 of file wsh.h.

3.26.2.38struct sections_t wsh_t::shdrs

Definition at line 600 of file wsh.h.

3.26.2.39unsigned int wsh_t::sigbus_count

Definition at line 588 of file wsh.h.

3.26.2.40unsigned long long int wsh_t::sigbus_hash

Definition at line 592 of file wsh.h.

3.26.2.41unsigned int wsh_t::singlebranch_count

Definition at line 587 of file wsh.h.

3.26.2.42unsigned long long int wsh_t::singlebranch_hash

Definition at line 591 of file wsh.h.

The Witchcraft Compiler Collection

3.26 wsh_t Struct Reference

35

3.26.2.43unsigned int wsh_t::singlestep_count

Definition at line 586 of file wsh.h.

3.26.2.44unsigned long long int wsh_t::singlestep_hash

Definition at line 590 of file wsh.h.

3.26.2.45struct symbols_t wsh_t::symbols

Definition at line 602 of file wsh.h.

3.26.2.46unsigned int wsh_t::totsignals

Definition at line 552 of file wsh.h.

3.26.2.47unsigned int wsh_t::trace_rtrace

Definition at line 583 of file wsh.h.

3.26.2.48unsigned int wsh_t::trace_singlebranch

Definition at line 581 of file wsh.h.

3.26.2.49unsigned int wsh_t::trace_singlestep

Definition at line 580 of file wsh.h.

3.26.2.50unsigned int wsh_t::trace_strace

Definition at line 584 of file wsh.h.

3.26.2.51unsigned int wsh_t::trace_unaligned

Definition at line 579 of file wsh.h.

The documentation for this struct was generated from the following file:

• wsh/include/libwitch/wsh.h

The Witchcraft Compiler Collection

36

Data Structure Documentation

The Witchcraft Compiler Collection

Chapter 4

File Documentation

4.1 wcc/wcc.c File Reference

#include <bfd.h> #include <dlfcn.h> #include <elf.h> #include <errno.h> #include <fcntl.h> #include <getopt.h> #include <limits.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/mman.h> #include <sys/procfs.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/ucontext.h> #include <unistd.h> #include <utlist.h> #include <ctype.h> #include <libelf.h> #include <gelf.h> #include <nametotype.h> #include <nametoalign.h> #include <nametoentsz.h> #include <nametolink.h> #include <nametoinfo.h> #include <arch.h> #include <inttypes.h> #include <config.h> #include <capstone/capstone.h>

Data Structures

struct msec_t

struct mseg_t

struct ctx_t

struct symaddr

struct gimport_t

38

File Documentation

Macros

#define __USE_GNU

#define _GNU_SOURCE

#define DEFAULT_STRNDX_SIZE 4096

#define FLAG_BSS 1

#define FLAG_NOBIT 2

#define FLAG_NOWRITE 4

#define FLAG_TEXT 8

#define ifis(x) if(!strncmp(name, x, strlen(x)))

#define elis(x) else if(!strncmp(name, x, strlen(x)))

#define MAXPADLEN 20

#define EXTRA_CREATED_SECTIONS 4

#define RELOC_X86_64 1

#define RELOC_X86_32 2

#define Elf_Ehdr Elf32_Ehdr

#define Elf_Shdr Elf32_Shdr

#define Elf_Sym Elf32_Sym

#define Elf_Addr Elf32_Addr

#define Elf_Sword Elf64_Sword

#define Elf_Section Elf32_Half

#define ELF_ST_BIND ELF32_ST_BIND

#define ELF_ST_TYPE ELF32_ST_TYPE

#define Elf_Rel Elf32_Rel

#define Elf_Rela Elf32_Rela

#define ELF_R_SYM ELF32_R_SYM

#define ELF_R_TYPE ELF32_R_TYPE

#define ELF_R_INFO ELF32_R_INFO

#define Elf_Phdr Elf32_Phdr

#define Elf_Xword Elf32_Xword

#define Elf_Word Elf32_Word

#define Elf_Off Elf32_Off

#define ELFCLASS ELFCLASS32

#define ELFMACHINE EM_386

#define CS_MODE CS_MODE_32

#define RELOC_MODE RELOC_X86_32

#define nullstr "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"

Typedefs

typedef struct msec_t msec_t

typedef struct mseg_t mseg_t

typedef struct ctx_t ctx_t

typedef struct gimport_t gimport_t

Functions

int craft_section (ctx_t ctx, msec_t m)

unsigned int secindex_from_name (ctx_t ctx, const char name)

msec_t  section_from_name (ctx_t ctx, char name)

msec_t  section_from_addr (ctx_t ctx, unsigned long int addr)

int print_bfd_sections (ctx_t ctx)

msec_t  section_from_index (ctx_t ctx, unsigned int index)

unsigned int secindex_from_name_after_strip (ctx_t ctx, const char name)

The Witchcraft Compiler Collection

4.1 wcc/wcc.c File Reference

39

int analyze_text (ctx_t ctx, char data, unsigned int datalen, unsigned long int addr)

int save_reloc (ctx_t ctx, Elf_Rela r, unsigned int sindex, int has_addend)

unsigned int protect_perms (unsigned int perms)

void add_symaddr (ctx_t ctx, const char name, int addr, char symclass)

int add_extra_symbols (ctx_t ctx)

int rd_symbols (ctx_t ctx)

int entszfromname (const char name)

unsigned int max (unsigned int a, unsigned int b)

char  sec_name_from_index_after_strip (ctx_t ctx, unsigned int index)

int link_from_name (ctx_t ctx, const char name)

int info_from_name (ctx_t ctx, const char name)

int typefromname (const char name)

unsigned int alignfromname (const char name)

unsigned int ptype_from_section (msec_t ms)

unsigned int pflag_from_section (msec_t ms)

int phdr_cmp_premerge (mseg_t a, mseg_t b)

int phdr_cmp (mseg_t a, mseg_t b)

int sort_phdrs (ctx_t ctx)

int sort_phdrs_premerge (ctx_t ctx)

mseg_t  alloc_phdr (msec_t ms)

int create_phdrs (ctx_t ctx)

int merge_phdrs (ctx_t ctx)

int adjust_baseaddress (ctx_t ctx)

msec_t  mk_section (void)

char  reloc_htype_x86_64 (int thetype)

char  reloc_htype_x86_32 (int thetype)

char  reloc_htype (int thetype)

int fixup_strtab_and_symtab (ctx_t ctx)

int fixup_text (ctx_t ctx)

unsigned int append_sym (Elf_Sym s)

unsigned int append_strtab (char str)

void hexdump (unsigned char data, size_t size)

unsigned int open_best (ctx_t ctx)

int open_target (ctx_t ctx)

int copy_body (ctx_t ctx)

int load_binary (ctx_t ctx)

int flags_from_name (const char name)

int print_msec (ctx_t ctx)

int rd_sections (ctx_t ctx)

int save_dynstr (ctx_t ctx, GElf_Shdr shdr, char binary)

int save_dynsym (ctx_t ctx, GElf_Shdr shdr, char binary)

int patch_symbol_index (ctx_t ctx, Elf_Sym s)

int fixup_symtab_section_index (ctx_t ctx)

int append_reloc (Elf_Rela r)

int save_global_import (ctx_t ctx, char sname, msec_t sec, Elf_Rela r, unsigned int sindex)

int check_global_import (unsigned long int addr)

int internal_function_store (ctx_t ctx, unsigned long long int addr)

int rd_symtab (ctx_t ctx)

int rm_section (ctx_t ctx, char name)

int strip_binary_reloc (ctx_t ctx)

unsigned int libify (ctx_t ctx)

int print_maps (void)

ctx_t  ctx_init (void)

int usage (char name)

int print_version (void)

int desired_arch (ctx_t ctx, char name)

int ctx_getopt (ctx_t ctx, int argc, char argv)

int main (int argc, char argv)

The Witchcraft Compiler Collection

40

File Documentation

Variables

unsigned int maxoldsec = 0

unsigned int maxnewsec = 0