chromium/third_party/nasm/output/codeview.c

/* ----------------------------------------------------------------------- *
 *
 *   Copyright 1996-2020 The NASM Authors - All Rights Reserved
 *   See the file AUTHORS included with the NASM distribution for
 *   the specific copyright holders.
 *
 *   Redistribution and use in source and binary forms, with or without
 *   modification, are permitted provided that the following
 *   conditions are met:
 *
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
 *     copyright notice, this list of conditions and the following
 *     disclaimer in the documentation and/or other materials provided
 *     with the distribution.
 *
 *     THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
 *     CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
 *     INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 *     MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 *     DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 *     CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *     SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 *     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 *     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 *     HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 *     CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 *     OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 *     EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * ----------------------------------------------------------------------- */

/*
 * codeview.c Codeview Debug Format support for COFF
 */

#include "version.h"
#include "compiler.h"


#include "nasm.h"
#include "nasmlib.h"
#include "error.h"
#include "preproc.h"
#include "saa.h"
#include "hashtbl.h"
#include "outlib.h"
#include "pecoff.h"
#include "md5.h"

static void cv8_init(void);
static void cv8_linenum(const char *filename, int32_t linenumber,
        int32_t segto);
static void cv8_deflabel(char *name, int32_t segment, int64_t offset,
        int is_global, char *special);
static void cv8_typevalue(int32_t type);
static void cv8_output(int type, void *param);
static void cv8_cleanup(void);

const struct dfmt df_cv8 =;

/*******************************************************************************
 * dfmt callbacks
 ******************************************************************************/
struct source_file;

struct source_file {};

struct linepair {};

enum symbol_type {};

struct cv8_symbol {};

struct cv8_state {};
struct cv8_state cv8_state;

static void cv8_init(void)
{}

static struct source_file *register_file(const char *filename);
static struct coff_Section *find_section(int32_t segto);

static void cv8_linenum(const char *filename, int32_t linenumber,
        int32_t segto)
{}

static void cv8_deflabel(char *name, int32_t segment, int64_t offset,
        int is_global, char *special)
{}

static void cv8_typevalue(int32_t type)
{}

static void cv8_output(int type, void *param)
{}

static void build_symbol_table(struct coff_Section *const sect);
static void build_type_table(struct coff_Section *const sect);

static void cv8_cleanup(void)
{}

/*******************************************************************************
 * implementation
 ******************************************************************************/
static void calc_md5(const char *const filename,
        unsigned char sum[MD5_HASHBYTES])
{}

static struct source_file *register_file(const char *filename)
{}

static struct coff_Section *find_section(int32_t segto)
{}

static void register_reloc(struct coff_Section *const sect,
        char *sym, uint32_t addr, uint16_t type)
{}

static inline void section_write32(struct coff_Section *sect, uint32_t val)
{}

static inline void section_write16(struct coff_Section *sect, uint16_t val)
{}

static inline void section_write8(struct coff_Section *sect, uint8_t val)
{}

static inline void section_wbytes(struct coff_Section *sect, const void *buf,
        size_t len)
{}

static void write_filename_table(struct coff_Section *const sect)
{}

static void write_sourcefile_table(struct coff_Section *const sect)
{}

static void write_linenumber_table(struct coff_Section *const sect)
{}

static uint32_t write_symbolinfo_obj(struct coff_Section *sect)
{}

static uint32_t write_symbolinfo_properties(struct coff_Section *sect,
        const char *const creator_str)
{}

static uint32_t write_symbolinfo_symbols(struct coff_Section *sect)
{}

static void write_symbolinfo_table(struct coff_Section *const sect)
{}

static inline void align4_table(struct coff_Section *const sect)
{}

static void build_symbol_table(struct coff_Section *const sect)
{}

static void build_type_table(struct coff_Section *const sect)
{}