This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] to bfd: K&R C fix


Nick Clifton <nickc@redhat.com> wrote:

> : 2000-09-10  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
> : 
> : 	* elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names static.
>
> Approved and applied.

Thanks.

Jeffrey A Law <law@cygnus.com> wrote:

> I'd prefer to keep it an auto variable and just initialize it in a K&R
> friendly way.

No, I think that making it static is definitely better, because it's much more
efficient for a constant array. Making it static means that both the strings
and the array of pointers to them will be completely build at compile time and
sit ready to use in the program image. Making it automatic means that each time
the code executes, it will have to allocate the array on the stack and fill it
in. This is a waste.

--
Michael Sokolov		Harhan Engineering Laboratory
Public Service Agent	International Free Computing Task Force
			International Engineering and Science Task Force
			615 N GOOD LATIMER EXPY STE #4
			DALLAS TX 75204-5852 USA

Phone: +1-214-824-7693 (Harhan Eng Lab office)
E-mail: msokolov@ivan.Harhan.ORG (ARPA TCP/SMTP) (UUCP coming soon)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]