Exposing asm_set_function() and asm_set_section() for now

This commit is contained in:
Pierre Pronchery 2012-05-18 23:08:28 +00:00
parent 10a296fa96
commit 4030d1c97b
2 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/* $Id$ */ /* $Id$ */
/* Copyright (c) 2011 Pierre Pronchery <khorben@defora.org> */ /* Copyright (c) 2011-2012 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Devel asm */ /* This file is part of DeforaOS Devel asm */
/* This program is free software: you can redistribute it and/or modify /* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -47,6 +47,10 @@ int asm_set_arch(Asm * a, char const * arch);
char const * asm_get_format(Asm * a); char const * asm_get_format(Asm * a);
int asm_set_format(Asm * a, char const * format); int asm_set_format(Asm * a, char const * format);
int asm_set_function(Asm * a, char const * name, off_t offset, ssize_t size);
int asm_set_section(Asm * a, char const * name, off_t offset, ssize_t size,
off_t base);
/* useful */ /* useful */
/* detection */ /* detection */

View File

@ -160,6 +160,14 @@ int asm_set_function(Asm * a, char const * name, off_t offset, ssize_t size)
} }
/* asm_set_section */
int asm_set_section(Asm * a, char const * name, off_t offset, ssize_t size,
off_t base)
{
return asmcode_set_section(a->code, -1, name, offset, size, base);
}
/* useful */ /* useful */
/* asm_assemble */ /* asm_assemble */
int asm_assemble(Asm * a, AsmPrefs * prefs, char const * infile, int asm_assemble(Asm * a, AsmPrefs * prefs, char const * infile,