This is the talk page for discussing improvements to the Data segment article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||
|
Unnamed section
editI'm not 100% sure about the Rodata thing, and from all the extensive research I've done, there seems to be a lot of differences between the various systems. Can anyone find a better/more general way of saying that? --EatMyShortz 14:30, 16 Apr 2005 (UTC)
.section
.rodata ; a read-only data segment containing static data, for example a string
.string "Hello World!" ; a static string
Hpfeil (talk) 00:48, 23 July 2019 (UTC)
Picture Needed
editCan anyone draw a picture to explain the difference between .bss/.data/.code segment? Thanks in adavance! Visame (talk) 06:29, 8 June 2008 (UTC)
This article is heavily broken
edit- It starts out with "In the PC Architecture", but segments / sections are defined by the platform (Linux / BSD / Windows) and not by the architecture (x86 PC / PowerPC / ARM).
- The article only has one reference, which is some HOWTO on embedded programming. It would be very easy to find a much better reference, such as the ELF specification or an operating systems / compilers book.
- The article's only reference contradicts the information in the article. Search for the word "segment" in the reference, you won't find it. The reference mentions several *sections* however, such as the .data and .rodata sections.
- The article has a tone that is too informal for an Encyclopedia.
- The article inconsistently refers to the data segment as a "section" or a "segment". The two terms have distinct technical meanings on ELF: a segment is a collection of sections loaded as a group.
63.227.219.18 (talk) 05:32, 17 June 2011 (UTC)
- I second that ! also to add to the list :
- malloc and free are not system calls at all. sbrk is a system call. nobody calls it directly. malloc is libc. Lightness1024--124.35.138.250 (talk) 03:35, 16 June 2014 (UTC)
Assembly vs C problem
editCould someone please define more precise what in the article text that is concidered wrong or doubtful. It seems to me that some assembly programmer and an other c programmer cannot agree. It must be remembered that the artcle is about memory as such, not PC or PC-memory. 83.249.42.164 (talk) 22:27, 30 July 2012 (UTC)
Incorrect information based upon actual testing with C program
editI have tested on Linux (x86) with gcc and MacOS (x64) with gcc/clang and proved the information of this article wrong. From lower memory address to higher memory address, initialized variable should come before uninitialized variables. That is, the relative segment sequence should be: code -> constants(string literals) -> initialized data -> uninitialized data -> heap -> stack.
- The order is largely irrelevant and down to the operating system and compiler in use. In GCC+Linux/x86 it may be different to in .NET/Windows, or Fortran on VAX/VMS. There is no standard that every operating system and language adheres to. You cannot pick one system at random and say "Everything else is wrong because I say this is right" - there is no right and wrong, only "how it is done in XXX system using YYY language".
BraveGNU.org
editWhy is BraveGNU.org being listed under References at all? --johayek (talk) 12:02, 24 February 2016 (UTC)