mirror of
https://github.com/darlinghq/darling-gdb.git
synced 2025-01-19 07:24:48 +00:00
* config/obj-som.c (obj_som_version): Pass version string to
SOM BFD backend. (obj_som_copyright): New function. Much like obj_som_version. * config/tc-hppa.c (obj_copyright): Define as appropriate for SOM and ELF. (pa_copyright): Just a stub now.
This commit is contained in:
parent
f6c2300b0a
commit
eb91665b4c
@ -1,5 +1,13 @@
|
|||||||
Sun Dec 5 17:05:29 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
Sun Dec 5 17:05:29 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
|
||||||
|
|
||||||
|
* config/obj-som.c (obj_som_version): Pass version string to
|
||||||
|
SOM BFD backend.
|
||||||
|
(obj_som_copyright): New function. Much like obj_som_version.
|
||||||
|
|
||||||
|
* config/tc-hppa.c (obj_copyright): Define as appropriate for
|
||||||
|
SOM and ELF.
|
||||||
|
(pa_copyright): Just a stub now.
|
||||||
|
|
||||||
* config/obj-som.c (obj_read_begin_hook): Delete unused function.
|
* config/obj-som.c (obj_read_begin_hook): Delete unused function.
|
||||||
* config/obj-som.h (obj_read_begin_hook): Provide dummy definition.
|
* config/obj-som.h (obj_read_begin_hook): Provide dummy definition.
|
||||||
(TARGET_SYMBOL_FIELDS): Delete. SOM isn't making use of them.
|
(TARGET_SYMBOL_FIELDS): Delete. SOM isn't making use of them.
|
||||||
|
@ -32,24 +32,84 @@ const pseudo_typeS obj_pseudo_table[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Handle a .version directive. FIXME. We just parse the .version
|
static int version_seen = 0;
|
||||||
directive and throw away the results!. */
|
static int copyright_seen = 0;
|
||||||
|
|
||||||
|
/* Handle a .version directive. */
|
||||||
|
|
||||||
void
|
void
|
||||||
obj_som_version (unused)
|
obj_som_version (unused)
|
||||||
int unused;
|
int unused;
|
||||||
{
|
{
|
||||||
|
char *version, c;
|
||||||
|
|
||||||
|
if (version_seen)
|
||||||
|
{
|
||||||
|
as_bad ("Only one .version pseudo-op per file!");
|
||||||
|
ignore_rest_of_line ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
SKIP_WHITESPACE ();
|
SKIP_WHITESPACE ();
|
||||||
if (*input_line_pointer == '\"')
|
if (*input_line_pointer == '\"')
|
||||||
{
|
{
|
||||||
|
version = input_line_pointer;
|
||||||
++input_line_pointer;
|
++input_line_pointer;
|
||||||
while (is_a_char (next_char_of_string ()))
|
while (is_a_char (next_char_of_string ()))
|
||||||
;
|
;
|
||||||
|
c = *input_line_pointer;
|
||||||
|
*input_line_pointer = '\000';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
as_bad ("Expected quoted string");
|
as_bad ("Expected quoted string");
|
||||||
|
ignore_rest_of_line ();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
version_seen = 1;
|
||||||
|
bfd_som_attach_aux_hdr (stdoutput, VERSION_AUX_ID, version);
|
||||||
|
*input_line_pointer = c;
|
||||||
|
demand_empty_rest_of_line ();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Handle a .copyright directive. This probably isn't complete, but
|
||||||
|
it's of dubious value anyway and (IMHO) not worth the time to finish.
|
||||||
|
If you care about copyright strings that much, you fix it. */
|
||||||
|
|
||||||
|
void
|
||||||
|
obj_som_copyright (unused)
|
||||||
|
int unused;
|
||||||
|
{
|
||||||
|
char *copyright, c;
|
||||||
|
|
||||||
|
if (copyright_seen)
|
||||||
|
{
|
||||||
|
as_bad ("Only one .copyright pseudo-op per file!");
|
||||||
|
ignore_rest_of_line ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
SKIP_WHITESPACE ();
|
||||||
|
if (*input_line_pointer == '\"')
|
||||||
|
{
|
||||||
|
copyright = input_line_pointer;
|
||||||
|
++input_line_pointer;
|
||||||
|
while (is_a_char (next_char_of_string ()))
|
||||||
|
;
|
||||||
|
c = *input_line_pointer;
|
||||||
|
*input_line_pointer = '\000';
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
as_bad ("Expected quoted string");
|
||||||
|
ignore_rest_of_line ();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
copyright_seen = 1;
|
||||||
|
bfd_som_attach_aux_hdr (stdoutput, COPYRIGHT_AUX_ID, copyright);
|
||||||
|
*input_line_pointer = c;
|
||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,8 +52,10 @@ typedef elf_symbol_type obj_symbol_type;
|
|||||||
/* How to generate a relocation. */
|
/* How to generate a relocation. */
|
||||||
#define hppa_gen_reloc_type hppa_elf_gen_reloc_type
|
#define hppa_gen_reloc_type hppa_elf_gen_reloc_type
|
||||||
|
|
||||||
/* Who knows. */
|
/* ELF objects can have versions, but apparently do not have anywhere
|
||||||
|
to store a copyright string. */
|
||||||
#define obj_version obj_elf_version
|
#define obj_version obj_elf_version
|
||||||
|
#define obj_copyright obj_elf_version
|
||||||
|
|
||||||
/* Use space aliases. */
|
/* Use space aliases. */
|
||||||
#define USE_ALIASES 1
|
#define USE_ALIASES 1
|
||||||
@ -73,8 +75,9 @@ static void hppa_tc_make_symextn_section PARAMS ((void));
|
|||||||
/* Object file formats specify relocation types. */
|
/* Object file formats specify relocation types. */
|
||||||
typedef int reloc_type;
|
typedef int reloc_type;
|
||||||
|
|
||||||
/* Who knows. */
|
/* SOM objects can have both a version string and a copyright string. */
|
||||||
#define obj_version obj_som_version
|
#define obj_version obj_som_version
|
||||||
|
#define obj_copyright obj_som_copyright
|
||||||
|
|
||||||
/* Do not use space aliases. */
|
/* Do not use space aliases. */
|
||||||
#define USE_ALIASES 0
|
#define USE_ALIASES 0
|
||||||
@ -4459,39 +4462,6 @@ pa_comm (unused)
|
|||||||
demand_empty_rest_of_line ();
|
demand_empty_rest_of_line ();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Process a .COPYRIGHT pseudo-op. */
|
|
||||||
|
|
||||||
static void
|
|
||||||
pa_copyright (unused)
|
|
||||||
int unused;
|
|
||||||
{
|
|
||||||
char *name;
|
|
||||||
char c;
|
|
||||||
|
|
||||||
SKIP_WHITESPACE ();
|
|
||||||
if (*input_line_pointer == '\"')
|
|
||||||
{
|
|
||||||
++input_line_pointer;
|
|
||||||
name = input_line_pointer;
|
|
||||||
while ((c = next_char_of_string ()) >= 0)
|
|
||||||
;
|
|
||||||
c = *input_line_pointer;
|
|
||||||
*input_line_pointer = '\0';
|
|
||||||
*(input_line_pointer - 1) = '\0';
|
|
||||||
{
|
|
||||||
/* FIXME. Not supported */
|
|
||||||
abort ();
|
|
||||||
}
|
|
||||||
*input_line_pointer = c;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
as_bad ("Expected \"-ed string");
|
|
||||||
}
|
|
||||||
pa_undefine_label ();
|
|
||||||
demand_empty_rest_of_line ();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Process a .END pseudo-op. */
|
/* Process a .END pseudo-op. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -6176,6 +6146,16 @@ pa_version (unused)
|
|||||||
pa_undefine_label ();
|
pa_undefine_label ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Handle a .COPYRIGHT pseudo-op. */
|
||||||
|
|
||||||
|
static void
|
||||||
|
pa_copyright (unused)
|
||||||
|
int unused;
|
||||||
|
{
|
||||||
|
obj_copyright (0);
|
||||||
|
pa_undefine_label ();
|
||||||
|
}
|
||||||
|
|
||||||
/* Just like a normal cons, but when finished we have to undefine
|
/* Just like a normal cons, but when finished we have to undefine
|
||||||
the latest space label. */
|
the latest space label. */
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user