mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-07-25 02:43:21 +08:00
* config/obj-coff.c (yank_symbols): Check that FNAME_OFFSET is
non-zero before assuming this is a long file name. (w_strings): Likewise. (c_dot_file_symbol): Set FNAME_OFFSET to 1 for a long file name. * config/obj-coff.c (w_strings): Move declaration of i inside #ifdef block which uses it.
This commit is contained in:
@ -1,3 +1,13 @@
|
|||||||
|
Tue May 7 11:24:10 1996 Ian Lance Taylor <ian@cygnus.com>
|
||||||
|
|
||||||
|
* config/obj-coff.c (yank_symbols): Check that FNAME_OFFSET is
|
||||||
|
non-zero before assuming this is a long file name.
|
||||||
|
(w_strings): Likewise.
|
||||||
|
(c_dot_file_symbol): Set FNAME_OFFSET to 1 for a long file name.
|
||||||
|
|
||||||
|
* config/obj-coff.c (w_strings): Move declaration of i inside
|
||||||
|
#ifdef block which uses it.
|
||||||
|
|
||||||
Tue May 7 00:49:58 1996 Jeffrey A Law (law@cygnus.com)
|
Tue May 7 00:49:58 1996 Jeffrey A Law (law@cygnus.com)
|
||||||
|
|
||||||
* config/tc-h8300.c (do_a_fix_imm): Rename last argument to
|
* config/tc-h8300.c (do_a_fix_imm): Rename last argument to
|
||||||
|
@ -2726,7 +2726,8 @@ yank_symbols ()
|
|||||||
{
|
{
|
||||||
/* If the filename was too long to fit in the
|
/* If the filename was too long to fit in the
|
||||||
auxent, put it in the string table */
|
auxent, put it in the string table */
|
||||||
if (SA_GET_FILE_FNAME_ZEROS (symbolP) == 0)
|
if (SA_GET_FILE_FNAME_ZEROS (symbolP) == 0
|
||||||
|
&& SA_GET_FILE_FNAME_OFFSET (symbolP) != 0)
|
||||||
{
|
{
|
||||||
SA_SET_FILE_FNAME_OFFSET (symbolP, string_byte_count);
|
SA_SET_FILE_FNAME_OFFSET (symbolP, string_byte_count);
|
||||||
string_byte_count += strlen (filename_list_scan->filename) + 1;
|
string_byte_count += strlen (filename_list_scan->filename) + 1;
|
||||||
@ -2942,7 +2943,6 @@ w_strings (where)
|
|||||||
{
|
{
|
||||||
symbolS *symbolP;
|
symbolS *symbolP;
|
||||||
struct filename_list *filename_list_scan = filename_list_head;
|
struct filename_list *filename_list_scan = filename_list_head;
|
||||||
unsigned int i;
|
|
||||||
|
|
||||||
/* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */
|
/* Gotta do md_ byte-ordering stuff for string_byte_count first - KWK */
|
||||||
md_number_to_chars (where, (valueT) string_byte_count, 4);
|
md_number_to_chars (where, (valueT) string_byte_count, 4);
|
||||||
@ -2951,18 +2951,22 @@ w_strings (where)
|
|||||||
#ifdef COFF_LONG_SECTION_NAMES
|
#ifdef COFF_LONG_SECTION_NAMES
|
||||||
/* Support long section names as found in PE. This code must
|
/* Support long section names as found in PE. This code must
|
||||||
coordinate with that in coff_header_append and write_object_file. */
|
coordinate with that in coff_header_append and write_object_file. */
|
||||||
for (i = SEG_E0; i < SEG_LAST; i++)
|
{
|
||||||
{
|
unsigned int i;
|
||||||
if (segment_info[i].scnhdr.s_name[0]
|
|
||||||
&& strlen (segment_info[i].name) > SCNNMLEN)
|
|
||||||
{
|
|
||||||
unsigned int size;
|
|
||||||
|
|
||||||
size = strlen (segment_info[i].name) + 1;
|
for (i = SEG_E0; i < SEG_LAST; i++)
|
||||||
memcpy (where, segment_info[i].name, size);
|
{
|
||||||
where += size;
|
if (segment_info[i].scnhdr.s_name[0]
|
||||||
}
|
&& strlen (segment_info[i].name) > SCNNMLEN)
|
||||||
}
|
{
|
||||||
|
unsigned int size;
|
||||||
|
|
||||||
|
size = strlen (segment_info[i].name) + 1;
|
||||||
|
memcpy (where, segment_info[i].name, size);
|
||||||
|
where += size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif /* COFF_LONG_SECTION_NAMES */
|
#endif /* COFF_LONG_SECTION_NAMES */
|
||||||
|
|
||||||
for (symbolP = symbol_rootP;
|
for (symbolP = symbol_rootP;
|
||||||
@ -2978,7 +2982,8 @@ w_strings (where)
|
|||||||
where += size;
|
where += size;
|
||||||
}
|
}
|
||||||
if (S_GET_STORAGE_CLASS (symbolP) == C_FILE
|
if (S_GET_STORAGE_CLASS (symbolP) == C_FILE
|
||||||
&& SA_GET_FILE_FNAME_ZEROS (symbolP) == 0)
|
&& SA_GET_FILE_FNAME_ZEROS (symbolP) == 0
|
||||||
|
&& SA_GET_FILE_FNAME_OFFSET (symbolP) != 0)
|
||||||
{
|
{
|
||||||
size = strlen (filename_list_scan->filename) + 1;
|
size = strlen (filename_list_scan->filename) + 1;
|
||||||
memcpy (where, filename_list_scan->filename, size);
|
memcpy (where, filename_list_scan->filename, size);
|
||||||
@ -3535,7 +3540,7 @@ c_dot_file_symbol (filename)
|
|||||||
f->next = 0;
|
f->next = 0;
|
||||||
|
|
||||||
SA_SET_FILE_FNAME_ZEROS (symbolP, 0);
|
SA_SET_FILE_FNAME_ZEROS (symbolP, 0);
|
||||||
SA_SET_FILE_FNAME_OFFSET (symbolP, 0);
|
SA_SET_FILE_FNAME_OFFSET (symbolP, 1);
|
||||||
|
|
||||||
if (filename_list_tail)
|
if (filename_list_tail)
|
||||||
filename_list_tail->next = f;
|
filename_list_tail->next = f;
|
||||||
|
Reference in New Issue
Block a user